Hats in Platform Racing 2 each grant a special ability. Here is how to earn them, with their effects in italics:
Kong Hat: Play the game on Kongregate.com (increases EXP gain by 25%)
EXP Hat: Won randomly from levels (increases EXP gain by 100%)
Santa Hat: Won randomly, like the EXP Hat (freezes tiles beneath you, letting you walk on water)
Propeller Hat: Complete the "Hat Factory" (hold up to fall more slowly)
Crown Hat: Earn 5,000 points in F@H, or become a moderator (immune to mines)
Cowboy Hat: Earn 100,000 points in F@H (lets you fly, like an unlimited jetpack)
Party Hat: Won randomly and very rarely (immune to lightning)
The Party Hat is far rarer than the EXP or Santa hats, so consider yourself lucky if you pull one.