The first thing to consider when thinking about purchasing a MTB is your budget. Secondly, you have to determine the type of MTN biking you’ll be doing the majority of the time. This information should lead you to the appropriate type of MTB.
The last, but certainly not the least thing to consider, is the fit and the correct frame size for yourself. Just because you fit a 16" frame on a Trek MTB, doesn’t mean that a 16" Giant frame will suit you. Therefore, you absolutely must test ride any bike for about 10-20 minutes, prior to making any final purchase.
Also, somewhere in the middle of all of these important things to consider, there are groupset levels of components that you must consider, as well.
Shimano hierarchy goes like the following:
XTR > Deore XT > SLX > Deore LX > Deore > Alivio > Acera > Altus > Tourney > Moose Turds
Sram hierarcy goes like the following:
XX > X0 > X9 > X7 > X5 > X4 > X3 > Bear Scat