Banks don't loan money to just anybody. They want to feel secure that you're able and responsible enough to pay them back. So you'll usually need these things in order for the bank to give you a loan:
• Enough money for the Down Payment (3% to 20% of the purchase price)
• Two years of steady employment (same job or field)
• Good (not perfect) credit score (~660+, as of 6/09)
• Monthly income that's 2 to 3 times higher than your expected monthly mortgage payment
If you don't have all four items above right, you may still have some options.
• Meet with a lender anyway. Don't just assume you can't get a mortgage. It can't hurt to go talk to a bank and see whether they're willing to give you a loan. Even if they won't give you a loan they can probably help you by letting you know where the deficiencies are, so you can work towards qualifying in the future.