Cosmetics are mostly unlocked through playtime but also come with some of the donator Ranks! Every 45 minutes of non-afk playtime you will receive a Mystery Vault which can be opened along with other Rewards at /crates.
When opening a mystery vault, you have a chance to win five different kinds of cosmetics: particles, pets, cloaks, hats, and animated hats! Once you've gotten your cosmetics, you can access them through their individual menus (/pets, /hats, /particles, etc.) or the main menu with /cosmetics.
Animated Hat Example