Team Fortress 2/Classes

There are a total of nine classes that you can play as in Team Fortress 2. Each has its own particular strengths and weaknesses, and have varying effectiveness depending on the situation. Knowing how, and particularly when, to use the different classes is vital to winning any map; you can't just play the same class all the time.

The classes are divided into Attack, Defence and Support. The Scout, Soldier and Pyro make up the Attack classes, the Demoman, Heavy and Engineer make up the Defence classes, and the Medic, Sniper and Spy make up the Support classes. Although they are divided up as such this doesn't mean they are only effective in those roles - for instance, a Heavy/Medic combination is an extremely powerful offensive force, especially with the Medic's Übercharge ability.

Offense
These classes excel at rushing at the enemy, wrecking havok and causing chaos. They have good firepower and has ways to survive offensive pushes. The Scout serves as a good distraction to enemies, while being dangerous if left alone. Their doubled capturing rate and cart-pushing rate makes them a valuable teammate when on the attacking side. Their fast speed allows them to get in, do their job and escape. The Soldier is a pretty balanced class. His rockets are powerful projectiles with high damage and wide splash damage. He can also use his rocket jump for additional mobility, and his higher health allows him to do that and still put up a fight in combat. The Pyro is well known for his iconic Flamethrower. He can set alight enemies at close range, with the afterburn weakening or killing of his foes. He is deadly when he ambushes, and is a powerful force on the frontlines, too.
 * Scout
 * Soldier
 * Pyro

Defense
These classes usually defend mission objectives. As such, they have lots of firepower and the ability to hold their ground in combat. The Demoman has his grenades and stickybombs. He can lay stickybomb traps on commonly traversed entrances and detonate them, killing anyone who passes. His Grenade Launcher is also useful for direct combat, as it deals high damage and goes around corners. His wide array of Melee weapons also makes him a powerful foe up close. The Heavy is the tank of the team. He has high health to allow him to survive heavy fire, and can mow down opponents with his Minigun. While he is slow and a large target, he can heal himself and hold his position well. The Engineer helps his team with his Buildings. His Sentry Gun is a powerful weapon that can quickly kill any class, useful for defending objectives like control points. His Dispensers give him and his teammates health and ammo, letting them last longer on the battlefield. His Teleporters also helps teammates reach the frontlines faster.
 * Demoman
 * Heavy
 * Engineer

Support
These classes help their teammates indirectly. They don't fight with their teammates at the frontlines, but they make their jobs easier. Their direct combat abilities are usually mediocre, but is compensated by their effectiveness at their roles. Perhaps the most important support class, the Medic can heal wounded teammates, overheal his team and deploy Ubercharges. The ability to heal is important for keeping the team alive. His famous Ubercharges can grant invulnerability or critical hits, letting his teammates push forward or to stop an enemy push. The Sniper operates from behind his team, picking off opponents from long range. He can instantly kill most classes with headshots from his Rifle, and his Jarate can also make enemies easy meat for his team. While the Sniper operates behind his team, the Spy operates behind the enemy's. He can disguise as any class on either team and turn invisible. Using his trickery he can infiltrate the enemy's base without being discovered. Once he's in he can sap buildings or backstab enemies, having the only attack capable of killing in one hit reliably.
 * Medic
 * Sniper
 * Spy