Since I'm an experienced ('experienced' means I've spent a lot of time on a bike, not to be confused with 'expert') bicyclist I thought I'd take a little bit of time and write down a few thoughts for people who are getting familiar with riding again, especially those who are getting into mountain biking.
There are a lot of different opinions on bikes - and I am not an equipment kind of guy, so I don't have much to add. As far as advice on buying a bike I have one major point - buy from a reputable local bike shop. For God's sake do not buy a Walmart/Target bike - please, just don't do it. Go to a local shop, tell the person there what you want to do on your bike, and let them guide you towards the right bike. If you can, try to compare a couple of shops. Stick with your budget and don't get talked into a really expensive bike right off the bat. If you're starting in mtb you should be able to get a 26" hardtail for less than $800. This will not be a top of the line bike, but should be perfectly adequate for a new cross country mountain bike rider.
What other gear are you going to NEED to start riding? Two items - helmet and gloves. Of course you can spend a thousand dollars on neat new Lycra bike jerseys and shorts, with matching socks etc. But what you really need is a helmet (for all singletrack mountain bike rides) and padded bike gloves. A small backpack is nice for carrying water and snacks, and as you get more involved in riding you can pack first aid kits, spare tubes and tire pump, bike tools, lights etc. But when you start - helmet and gloves.
If you haven't been on a bike in years (or even decades) it can take a while to get back into the swing of riding. I started again in my mid 40's after not riding more than 20 miles a year for two decades. It took me a while to get my leg muscles toned up so that it wasn't so hard to pedal. If you're in the same situation consider getting used to riding by putting some in some miles on bike trails, or low traffic paved roads. This way you can focus on the first requirement - getting your leg muscles ready to move you and the bike for an extended period of time - without having to worry about picking up new skills like riding over roots and rocks.
So now you're out riding on your new bike, and it's a lot of fun. The wind is in your face, you're picking up the shifting concept and you can put down some miles. But by the end of the first ride your butt is killing you. There are a couple of things to know about this. First - your rear end will get used to riding a bike after a while. Second - you can adjust the position of your seat to make it more comfortable, all it takes is a hex key. Third - you can change your seat to something more comfortable than the stock seat that came with your bike (try a slightly wider seat with gel or memory foam, and check out one with the relief cutout in the center). And fourth - riding your bike on the pavement is different than riding a mountain bike on singletrack (i.e. dirt trails). On pavement you pretty much stay seated, not changing position but instead cranking out the miles. But when you're riding on singletrack you're far more dynamic in your position - moving forward or backward, and often standing out of the seat. Riding like this is way easier on your rear end than pavement riding. So do not despair if you get sore at first, this can be dealt with.
And you can start picking up the skills you'll need to get on dirt while riding around your neighborhood. Practice getting out of the saddle - standing up while coasting, and then while pedaling. When you're comfortable doing this try riding with your weight shifted back, so that you're butt is hanging off the back of the seat a bit. This is the technique you'll use to keep from going forward over the bars when descending steep bits of trail. You can try riding off curbs while out of the seat to start getting the feel for what a small drop feels like. Once you can do that, try riding up a curb at a slow rate of speed - approach while out of the seat, pre-load your front shock by quickly shifting your weight forward, and then pull back up on the bars as the shock bounces back and unweight your front wheel so that it can get up and over the curb. Check out Youtube - there are many, many videos on there that can help new riders develop specific skills, where you can see it done right, in slow motion, over and over again.
Your first ride on singletrack - an incredible experience for most. Try to find out where the beginner level trails are in your area - do not try to start on something advanced and technical, because that takes a good deal of skills you aren't likely to have. Instead look for trails with not many hills, and not huge amounts of rocks or roots. And don't try to do a ten mile trail the first time out - it's probably going to be way harder than you thought, and a couple of miles may be more than enough. If you can get an experienced rider to go with you that's probably a good idea. They can point out areas that are going to require specific skills or help guide you away from more hazardous features. Watch how they deal with riding over roots and shifting to get up sudden hills, and remember to try and practice that when riding around your neighborhood or on your next singletrack ride.
Once you get that bare minimum of skills needed to make it at least partway around your local trail, what do you do to be able to ride like a pro? Watching videos can give you some ideas, but the only way to get good is to spend time in the saddle. Try to ride a couple of times a week if you can, or get out and build leg and cardio vascular strength with pavement rides until you can get back on the dirt. Nothing makes a better rider like getting in three riding sessions a week for a summer. You won't believe the difference at the end of a couple of months.
Good luck to all the aspiring mountain bikers out there. It's a great way to get fit, lose weight, and spend time in the great outdoors.