A mortgage is a transfer of an interest in real estate as security for the repayment of a loan. A typical mortgage transaction involves a home purchaser borrowing money from a lender and entering into a written agreement with the lender to the effect that the real estate is collateral for the loan. If the homeowner defaults on the loan, the lender is entitled to foreclose on the real estate and have it sold to reduce the debt. Depending on the terms of the agreement, the lender may then be entitled to pursue the homeowner for payment of any deficiency.