What exactly happens when you have a nervous breakdown?

Generic term. Nervous breakdown could mean a lot of different things. You need to see a psychiatrist to help identify what you mean by nervous breakdown.
Old fashoned term. This term could refer to anything from a psychotic break to depression to anxiety. It is not a term with a specific diagnosis or set of symptoms.