Mortgage prequalification is your first step on the path towards buying a home. After you've decided you're interested in purchasing a home and perhaps even browsed a little, a prequalification is a ballpark figure of the loan for which you might be qualified.
To pre-qualify for a mortgage, you will summarize for the lender your current income, assets, and debts, and provide an estimated down payment that you could make on a home. The bank takes this information and comes up with your debt-to-income ratio, which it then uses to determine an estimated maximum loan amount for which you would qualify.
Importantly, however, prequalification is based solely on your word. The lender does not order a credit report on you, so there is no verification of your financial information. Thus, there is no guarantee that you will receive the estimated loan, and if the information you give the lender is incorrect, the maximum loan amount will almost certainly change. A prequalification letter from a lender might say that you are "likely" to be approved for a loan of a certain amount, but it will not promise anything.
Mortgage prequalification is thus limiting, but it is also freeing. There is no cost for prequalification, and you are not committed to anything, including the lender (just as the lender is not committed to you). You can take the ballpark figure and continue browsing for houses risk-free. Remember, however, that prequalification is just a first step. When you get more serious about buying a home, it's probably time to move on to preapproval.