This article is a great wrap-up of often asked questions. I love to make recommendations on what bike to buy! Here's an article that covers the basics.
However, the article doesn't contain my own personal axiom: if you're going to spend less than $500 on a bike you might as well take 5 $100 dollar bills and nail them to the wall in your garage. That's because you'll never ever ride a sub-$500 bike. Never ever.
You want a bike that shifts well and is light enough to be fun to ride. You really can't get that for under $500...at least not for a road bike. (Fixies and single speeds are exceptions, of course.)