If you buy a home for lets say 100,000 and pay mortgage on it each month lets say 2,000, and then you sell the home 3 month after purchase, and made total of 6,000 in payments so far. Would you now owe the bank only around 94000 dollars and you can keep the 6000?
(I did not consider the interest rate and other fees in my example, I am just wondering how it works in general)