Mountain bikes come in several different styles, depending on where you're planning to ride:
Cross-country bikes (also called XC bikes) are lightweight and efficient. They're great for smooth trails with rolling hills, but you wouldn't want to take them on really rough terrain. Trail mountain bikes are modified cross-country bikes with a softer suspension to handle bigger obstacles.
All-mountain bikes were built to handle rough terrain. They're heavier than cross-country bikes, and can climb hills with ease.
Downhill bikes are made for speed. They have the most suspension of any mountain bike and can take the abuse of rough courses with steep drops, but they're not ideal for uphill riding.
Dirt jump bikes tend to be smaller and are built to withstand big jumps.
Freeride bikes are easier to pedal than downhill bikes. Their thick wheels and long-travel suspension make them good for jumps, stunts and big drops.
Mountain bikes also come with two kinds of suspension, which protect the bike and rider from the shock of rough terrain:
Full suspension bikes have both front and rear suspension. They're heavier, more comfortable and easier to control than hardtail bikes.
Hardtail bikes have a front suspension fork, but no rear suspension. They are lighter and pedal more efficiently than full suspension, and they're more durable for off-road riding.