The phrase is informal and typically used in casual conversation, not formal writing. My mom's going to have a fit if she sees this mess!
Pro Tip 2/3
Exaggeration
Often used to exaggerate emotions for effect, may not mean literal loss of control. Dad will have a fit when he hears you borrowed his car without asking.
Pro Tip 3/3
Cultural Nuance
Considered childish or unprofessional; adults 'having a fit' can be viewed negatively. He's too grown-up to throw a fit over a video game.