A few things. I've been an avid mountain biker for 8 years....
1) Go to a bike shop. Not a department store. Not an REI. Not a chain bike store like Performance. A bike shop.
2) Get fitted for proper size.
3) Quality > Features in biking. Always buy quality over features.
4) Ask the bike shop to teach you how to properly take care of your bike.
5) Enjoy.
Prett good summary.
Avoid the big box stores because the employees are a crapshoot (do they care, do they know what they are doing, did they assemble it right .... etc.) Especially if you go off road, on rough roads/sidewalks, over curbs, etc.you really need the right size frame which is generally smaller then most people think.
Always buy quality over features. More cheap features means lower quality basics that will break more often.
For value, if YOU are EDUCATED you can do good on last year closeouts from a chain like Performance Bicycle for example. However, can you spot the employees that were flipping burgers or sacking groceries yesterday over the ones that rode 20 miles to get to work that day?
In your price range, you really need to get last years close out in a fitness/cross country style. They will be a little heaver then a dedicated street bicycle (lot heavier then a traditional "10" speed) but will have the frame to really put power down going up hill and over curbs. 18 gears is plenty so, again buy quality not 21 gears (which you probably won't use).
Used is an option but buyer beware. A poorly maintained model will cost you a lot of $$ and frustration to get on the road. However, like gym memberships, a weekend warrior model ridden once and then used as a clothes rack for two years CAN be a good value.