According to the ESRB, Team Fortress 2 carries an M for Mature rating.
That means it's intended for players 17 and older, largely due to its stylized but frequent combat and violence. It's worth keeping that rating in mind when deciding whether it's appropriate for younger players.