Brain Freeze is a cold stimulus head ache. It occurs when a cold stimulus is exposed to the mouth or nasal cavity. It involves the blood vessels and nerves of the cranium. Nobody really knows the exact science of them.
It has been said that migraine headache sufferers are more prone to Brain Freeze.
There is no cure except for eating slower or putting your tongue to the roof of your mouth or sipping a warm drink.