I'm new to mountain biking and wondered what mountain bike to buy?

I'm 5'9 and want to ride off road in the forest and also a bit of down hill. As I'm new to this I don't want to spend more than 500, will I get a decent bike for this amount and if so what make/model is good?

Thank you