I'm told that this is quite a common move to do when playing around with a basketball, so if you're familiar with that sort of thing I guess this one's going to be easy!
Hold your hand out flat infront of you, a little lower than shoulder level. Gently push the hat upwards slightly as you move your hand around in a circle.
The idea is to move your hand around the crown of the hat, such that the hat spins, but remains relatively isolated in space. This is devilishly hard to explain, but the video clip has a slow motion replay so that you can see what's going on.
Top tip: The lift comes from the arm, the rotational movement should all come from the wrist.
Theoretically, it should be possible to spin the hat for more than one revolution using this technique, possibly indefinately!
I can't do that yet though.