A property is considered in foreclosure when the homeowner has not made a mortgage payment for at least 90 days. These properties can be purchased before the foreclosure auction (pre-foreclosure) or at the foreclosure auction which is a public sale. If no one purchases the property at the foreclosure auction then the property will be returned to the lender that owns the mortgage on the property.
Once a property is sold at the foreclosure auction and the foreclosure process is completed, the lender may keep the proceeds to satisfy their mortgage and any legal costs that they incurred. The foreclosing bank has the right to continue to honor the tenants lease (if there is a tenant in the property), but usually as a rule the bank wants the property vacant, in order to sell it more easily.