Well the most important rule of all is to always, ALWAYS turn around briefly every couple of seconds. You never know when a Spy might be sneaking up behind you.
I'd recommend that you focus on the Soldier or Medic for now. The Soldier's playstyle is the most straightforward, while the Medic allows you to observe how the other classes play while providing an invaluable service to your teammates.
Don't get discouraged if you're having a hard time. Bear in mind that many players have had literally years of experience to hone their skills, so don't be surprised if you frequently die at first.
The TF2 online community is a pretty friendly bunch for the most part, so feel free to ask for advice while in-game.
Finally, don't obsess over getting all the items and hats in the game. The alternate weapons are meant to be sidegrades, not upgrades, while the hats are (mostly) cosmetic.