Scout:
Haven't played this one much, but other people basically either try to bat you while running around in circles or they double jump all over like a maniac and shoot you.
Soldier:
Pretty straight forward, just run and shoot at their feet, if you got amazing aim, then shoot the person. It's also good to keep popping up from corners and surprising people. 2 rockets kill someone, 3 for the heavy. Also good for taking out sentries.
Pyro:
Do constant spy checks on your team, whenever you see a teammate just shoot him for half a second. As a pyro you don't want to stay too close to the enemy for too long, when you think you've done enough damage with a flamethrower, back away and let them die by themselves, or shotgun them.
If you take them by surprise around a corner, staying beside them the whole way through would be a good idea, it's not likely for them to kill you. Also useful for taking out sentries around corners, within the flames reach.
Demoman:
Stickies are your best friend here. Unless at point blank range or simply as a way to clear the area/scare tactic, the grenade thrower is total ass. You can play defense and place stickies along the walls and wait for someone to come by, or play attack. When you see someone coming towards you or just standing there, shoot 2 - 3 stickies in their area and wait for them to be close enough so you can do damage and explode away.
The Heavy:
Haven't played as him much. When I do though It's mostly for defending a point, the trolley or a sentry.
Engineer:
Not much to say here, pretty straight forward.
Medic:
Pretty straight forward. Don't try to be a hero and take on someone like a demo or a soldier by yourself.
Sniper:
Pretty straight forward.
Spy:
This is an interesting class. Be sure to stay away from pyro's no matter what, and constantly change your disguise to match the situation you are in. Act as if you are their teammate. Don't stand there and keep turning back to check if they noticed you or are about to shoot you, act natural. It's best to cloak as soon as you knifed someone and hide somewhere. Rinse and repeat.
As for sentries, there are two ways you could go about this, sap the sentry, wait for the engineer to start fixing and knife him, or keep sapping the sentry until it is destroyed. He won't be able to fix it if you stand there clicking on it. Be aware of other enemies though with that tactic. As soon as you killed the engi or destroyed the sentry, cloak and run away, don't stand there.
Some people say cloaking as one of your own team mates is also useful, but it never worked for me. No one is simply going to run away, even at the sight of 5 heavy's, the other team will still shoot at you.