Stephen R. Donaldson once wrote that the difference between drama and melodrama is that in melodrama, there is a victim, a victimizer, and a rescuer, and the story details the manner in which they interact, whereas in drama, there is a victim, victimizer, and rescuer, and the story details how they change roles.
This is a good explanation in gestalt terms, but is too limited. Another explanation helpful in understanding the difference comes from looking at the motivations behind the behavior of the characters in the piece. In melodrama, the characters act as they do for stupid or trivial reasons, making them seem shallow or two-dimensional. Their motivations frequently fail to hold up to even cursory inspection, and often seem to have been inserted into their brains automagically by the good old deus ex machina. For example, what motivates the villain in The World Is Not Enough? Oh, well, um, he has... a bullet lodged in his brain! Yes, that's the ticket! ...and it makes him mad! Mad, mad, I tell you! HAHahaha.... (screenwriter continues laughing all the way to the bank).
The characters in a drama will usually act as they do for more compelling reasons. We may not feel quite the same emotions as the characters, but usually it's possible to put ourselves in their shoes so that we can understand why they have those emotions.
To wit, not all of us shoot a german officer to help a ex-lover escape with her husband, but we can understand why Rick Blaine (Casablanca) does so. We can relate to his emotional experience, because his motive of altruism to redeem himself in the eyes of his lost love echoes in many of our hearts. Often, the most captivating is the fact that a dramatic character carry through on a feeling or motivation that many of us feel the urge to act on, but never have.
Melodrama is about going big: the shocking reveal, resorting to the gun, the character who goes mad.
It's exciting, it's surprising, but it's almost never honest. - John Truby
Stephen R. Donaldson quote from the afterword to The Real Story
Many thanks to eponymous for knowing the source of that quote.