If you wake with a start after a terrifying dream, you've had a nightmare.
A nightmare is not just a bad dream — it's seriously scary or upsetting. You can also use nightmare to describe something terrible that happens during the day. Your run-in with a skunk in your back yard might be a nightmare, for example, or your humiliating experience forgetting your lines in a play. In the late thirteenth century, a nightmare was "an evil female spirit afflicting sleepers with a feeling of suffocation," from the Old English word mare, "incubus or goblin."