AKA brain freeze:
When it detects intense cold, the body pumps more blood to the brain to keep it functioning in a warm environment. But that activity may also be raising pressure inside the skull, producing the headaches we call brain freeze. Recovery happens when the artery returns to its normal size.