If you choose to play engineer, watch were other engies build their sentries. If it seems like it gets taken out alot by non-ubered players, chances are that is not a good sentry placement spot. Use all of your weapons as engineer. Wrench is fine and good against cloaked spies, but shotty is much better overall.
If you choose to play pyro, don't go W+M1. A pyro that runs straight ahead flaming tends to be an easy target (and fun to backstab). Don't equip the backburner to start out, it'll get you into bad habits. The compression blast takes some getting used to, but once you master it, you can eliminate the advantage enemy rockets+arrows give them. It takes lots of timing, but it is hillarious to kill someone with their own weapon
If you choose to go spy, don't start out using dead ringer. Learn how to play properly with the invis watch or the cloak and dagger. Bad dead ringer spies tend to draw better spy checking techniques that really annoy other spies. If you sap a teleporter entrance, maybe try standing on it while disguised. If the engineer on the other end doesn't keep his distance, he'll be telefragged, and you may have a nice opening to sap stuff freely!
If you go sniper... Not much to say here

. If you feel yourself getting hit, and you can't see the person shooting you, de-scope and move quickly. If you stay in space, you are an easy target, especially for ambassador spies Jumping forward isn't perfect, but it sometimes throws the spy's aim off enough for you to survive to kill him.
If you go soldier, practice your rocket jumps. When you are in the air, you are much safer from targets on the ground, and shooting straight down has a much better chance of actually getting hits than shooting straight ahead from ground level. Learning how to rocket jump without the gunboats will give you a good idea of damage ratios for different types of jumps. It may not seem like much, but it could save your life at some point.
If you go medic, heal other players that need it (Enemy spies exempt). Feel free to spy check them first (unless they have chat bubble and your teammate is talking, or they have shot at you). A medic that doesn't heal is annoying, and teammates won't save you if you don't save them. Ubercharge pyros or demos for taking out multiple sentries if there isn't a compression blast pyro on the enemy team around. Heavy ubers are good for taking out trapped people close in, or close individual sentries, but not much else. Kritzkrieg soldiers and demos are amazing explosion fun!
If you go scout, prepare to die! Make sure to keep moving and try not to attack a class with full health from the front. You might get lucky, but you likely will end up a cinder on the floor with a pyro taunting over you! Sandman can be useful, but it lowers your health considerably, and your target can run away, which means you have to chase them without knowing when the stun will wear off. The Force Au Nature is annoying, but an alert player can usually prevent you from getting close enough to do any good with it. Try to sneak up and get as close as possible before firing, and don't waste both your shots at once, it isn't as effective.
If you go demo, look to someone else for help. I demo is one of my worst classes (I can't aim with the grenade launcher, and I don't like camping with stickies).