The difference between "have an exam" and "are having a party" is more related to the various nuances of the verb "to have" than grammar.
An exam is a single, scheduled event, and one that you can't avoid, so here "have" is somewhat synonymous with "must do", i.e. "I have to take this exam". This usage is not always an obligation, but it does imply a planned event, something already on the calendar.
Meanwhile, "having" a party is synonymous with "throwing" a party, as if it was something you own. You would only use it if it was your own event, where you are the host. So here "have" is like the usual use to imply ownership, i.e. "I own this event."
Moreover parties are ongoing events, so the feeling is of an event that occurs over some period of time, "We're going to be partying till dawn!"
Note that while both events are in the future, the statements are in the present/progressive tense because they are statements of current condition. In the same way that I have some money, or I have a cold, I can have an appointment for a future date.
I have my relatives coming to visit this evening
She has two surgeries scheduled for next week.
The store has a shipment of new furniture coming this Friday.