How do I know how much I can afford?

With a pre-qualification, you are getting an estimate of how big of a mortgage you can afford. Also, a good rule of thumb is that your debt payments (including your mortgage) should be no more than 36% of your income.