These days, Team Fortress 2 is completely free. You can download it from Steam at no cost.
The game's price dropped steadily over the years. It started out around $20, then fell to about $10, and eventually became free to play entirely.
Here's a fun bit of trivia: players who bought TF2 before it went free-to-play received a special hat called the "Proof of Purchase" as a nod to their early support.