Your loan can be sold at any time. There is a secondary mortgage market in which lenders frequently buy and sell pools of mortgages. This secondary mortgage market results in lower rates for consumers. A lender buying your loan assumes all terms and conditions of the original loan. As a result, the only thing that changes when a loan is sold is to whom you mail your payment. If your loan has been sold, your existing lender will notify you that your loan has been sold, who your new lender is, and where you should send your payments from now on.
If your lender goes out of business, you are still obligated to make payments! Typically, loans owned by a lender going out of business are sold to another lender. The lender purchasing your loan is obligated to honor the terms and conditions of the original loan. Therefore, if your lender goes out of business, it makes little difference with regards to your loan payments. In some cases, there may be a gap between the date of your lender's going out of business and the date that a new lender purchases your loan. In such a situation, continue making payments to your old lender until you are asked to make payments to your new lender.