Foreclosure is the legal proceeding in which a mortgagee, or other lienholder, usually a lender, obtains a court ordered termination of a mortgagor's equitable right of redemption. Usually a lender obtains a security interest from a borrower who mortgages or pledges an asset like a house to secure the loan. If the borrower defaults and the lender tries to repossess the property, courts of equity can grant the owner the right of redemption if the borrower repays the debt. When this equitable right exists, the lender cannot be sure that it can successfully repossess the property, thus the lender seeks to foreclose the equitable right of redemption. Other lienholders can and do use foreclosure, such as for overdue taxes, unpaid contractors' bills or overdue HOA dues or assessments.
The foreclosure process as applied to residential mortgage loans is a bank or other secured creditor selling or repossessing a parcel of real property (immovable property) after the owner has failed to comply with an agreement between the lender and borrower called a "mortgage" or "deed of trust". Commonly, the violation of the mortgage is a default in payment of a promissory note, secured by a lien on the property. When the process is complete, the lender can sell the property and keep the proceeds to pay off its mortgage and any legal costs, and it is typically said that "the lender has foreclosed its mortgage or lien".
When a house is in foreclosure it means basically that the current owners of the property have become so far behind in their mortgage payments that the lender/bank has filed a motion through the courts to take back ownership of the property and the holders of the mortgage will have been given orders to vacate the property and they lose their home.
Because the banks are not in the business of holding real estate on their books, their motivation is to sell the home as quickly as they can. Sometimes by auction and sometimes through the MLS (multiple listing service) as used by Realtors. You will find that the home is priced at a much lower rate than comparable properties in the area but oftentimes their is work to be done to the homes - each case has its own merits and problems, so there's no hard and fast rules about buying a foreclosure. The banks will usually want to be certain that a buyer is pre-approved or at least pre-qualified with their own lender and they usually dictate the terms of the sale. Having said that, you can do really well in buying the right foreclosure. I would definitely recommend that you work with an experienced Realtor that you feel comfortable with, so that they can guide you in the right direction.
Hope that helps!