Go to the 10th level (the second snowy level). Now, climb upwards (past the sweeping blocks of ice), to where the huge snowman tries to blow you off of him. I'm not quite sure how to make this happen - there be no way to "make" this happen, it just does. When you get blown away, sometimes your hat will fly at an angle. Just by sheer luck, it may land in the hole in the ice maze. (Extra info in case this might have affected the outcome: I was trying to do the glitch below; I was doing the first star of the world; I was about in the middle of the platform and behind the big penguin when I got blown away; the wind did not seem to hit me, but it did). If this happens, you will not be able to get back your hat ever again (from what I can tell). DO NOT SAVE. If you go through the ice maze and try to get to your hat, you will hit the star before the hat and you will fall onto your hat but not get it, since you're getting the star.
Submitted by: kornyhatemachine