The starting position for the basic spin
Hold the hat by the brim with your left hand so that the crown of the hat is facing away from you. Take the stick in your right hand.
With a flick of your wrist, throw the hat up slightly so that it starts spinning anti-clockwise. As the hat descends, hit the brim with the stick slightly to the right of center, such that the stick curves slightly upwards and outwards. This will cause the hat to spin as it rises into the air. As it descends again, repeat the hitting action.
The idea of the basic spin is to keep the hat in the air by hitting it repeatedly with the stick in this manner. I find it helps if you look at the top portion of the inside of the hat. (See illustration)
Once you have mastered the basic spin, there are several ways you can begin to vary it. In fact I would suggest that you try some of these early on as they will help you gain control of the hat.
Adjusting the spin rate and direction:
Hitting the hat nearer the center will give you a slower spin and more height, nearer the edge will give you a faster spin but less height. Obviously striking the left side of the brim will reverse the spin and cause the hat to go clockwise.