in california and most other states. The house is held with a note and deed of trust.
The note is like a IOU you promise to pay the bank the money you borrowed. The Deed of Trust says if you don't pay you agree to transfer the house back to the Bank. When you get an Loan to buy the house the Bank makes shure that there is no other leins on house. So the bank is first in line. the next lein is call the second and so on.
If you don't pay the house is transfered back to the Bank by the Deed of Trust and then sold for what they can get for it. If it sells for more that what is owed then any money would go to the next lein hold. If there is nothing left then the other lein holders get nothing. Most likely you will have to pay it back.