You don't need to worry about it. If you don't play TF2 already, it doesn't apply to Spiral Knights.
1) TF2 is a game made by Valve that's also available on Steam.
2) There are hats in Spiral Knights. There are hats in TF2. The one you're thinking of is in a separate game entirely.
3) You unlock the hat in TF2 by getting the "Mission Accomplish" achievement in Spiral Knights.
That is, you play SK to get a hat available for your account in Team Fortress 2. NOT that you play TF2 or anything to get a hat in Spiral Knights. (There's a costume hat available for inviting Steam friends to play SK, but that's not related to any achievement.)