When the house value is lower than the mortgage owed by the owner, and he doesn't want to continue to pay, he can request a short sale. The owner is still the seller, all the proceedings from the sale, after paying the closing cost, such as unpaid tax, commission, HOA, etc., will be forwarded to the creditor (the bank). Because the creditor loses money in the deal, so the transaction must be approved by the credit.
If the owner doesn't pay the mortgage and doesn't even bother to do the short sale, or the short sale fails, the bank will foreclose the house. After the foreclosure, the house becomes REO (real estate owned). At this time, you are buying from the bank.