This phrase often expresses a strong emotional response to something unexpected. After the surprise party, he didn't know what hit him.
Pro Tip 2/3
Sudden Change
Use this when something changes so suddenly that someone can't comprehend it immediately. She won the lottery and truly didn’t know what hit her.
Pro Tip 3/3
Metaphorical Use
It's often used metaphorically to describe an event that isn't a physical impact. The company merger happened overnight; the employees didn’t know what hit them.