Pre-qualification means that a bank has identified a borrower as credit worthy for a specific product; credit worthyness is determined from publically avaible information and from "soft credit checks" from the 3 major credit rating agencies.

Without performing a proper credit check, which requires specific personal authorization from a potential borrower and which might lower a persons credit score, lenders are still able to see some level of information from the credit agencies. This information is general, with some specific notes being that the borrower has no credit history, or that the borrow has made abusive installment trades.

With this information however, banks are able to figure out that a person most likely will have good enough credit for them to get a specific loan. Banks then usually solicit customers to inform them.

Pre-qualification is not the same as pre-aproval (in both senses of that word), because there is no possible way to verify income or other important factors.