A foreclosure happens when a homeowner fails to repay their loan according to its terms, resulting in a default. At that point, the bank can foreclose, meaning it forces a sale of the property to cover the loss.