There are many ways to get weapons in TF2.
#1. Drops - The game rolls a virtual "dice" every so often which determines when your next drop will be. Just through playing (Or even idling and doing nothing), you can get weapons. There are only a few weapons which are not droppable, and they are craftable.
#2. Crafting - The Sun-On-a-Stick and Sharpened Volcano Fragment can only be gotten by crafting (2 reclaimed + Boston Basher and 2 reclaimed + Axtinguisher). However, almost all weapons can be crafted through specific recipes, many of which are viewable from the start.
#3. Achievement milestones - Every class has three achievement milestones at 7, 14 and 21 achievements done. Each will award you a weapon for that class from their respective Class Update Packs. The Scout milestones, for instance, net you the Sandman, Bonk! Atomic Punch and Force-a-Nature.
#4. Promotions - Often, Valve does promotions for other games, where purchasing the game can get you weapons from that game quickly, without having to wait for them to drop/be craftable for you.
#5. Mann Co. Store - The store sells many items in the game, barring a few. They will cost real money though.