Most people have experienced the dreaded ice cream headache at some point. You are minding your own business, eating something like an ice cream cone, a milk shake, a Slurpee, a snow cone... Then, suddenly you are hit with the most excruciating headache! Fortunately it only lasts about 30 seconds.
So where does this headache come from?
This article by Joseph Hulihan contains some great information. Here's a summary: When something cold touches the roof of your mouth on a hot day, it triggers a cold headache. The cause is a dilation of blood vessels in the head. The dilation may be caused by a nerve center located above the roof of your mouth -- when this nerve center gets cold, it seems to over-react and tries to heat your brain.
Therefore, the easy way to avoid "brain freeze" is to keep cold things away from the roof of your mouth!