There's not a lot to this trick. Hold the hat in an inside grip. Lift your oposite leg, bending it at the knee. Now throw the hat under your leg so that it does a complete turn and lands perched on your knee.
Top Tip: Lift your leg nice and high and bend the knee a lot. This make the knee quite "pointed" and makes it easier to catch the hat.