Instructions
Launch "GMod" and click either on "New single-player game" or "New multiplayer game."
Select the HatMaker tool by opening the "Tools" menu and clicking on "HatMaker SVN." This will open a new window containing a list of available hats, organized by categories.
Double-click on the category that contains the hat you wish your character to equip, select the hat by clicking on it and click on "OK." Your character will now wear the selected hat. You can rotate the hat around the character's head by using the "Move" tool, that you can access by using your mouse's scroll wheel.