der Alptraum
nightmare
A very frightening and unpleasant dream.
Ich bin schweißgebadet aufgewacht, weil ich einen furchtbaren Alptraum hatte.
I woke up drenched in sweat because I had a terrible nightmare.

nightmare
Loading your saved state.
nightmare
A very frightening and unpleasant dream.
Ich bin schweißgebadet aufgewacht, weil ich einen furchtbaren Alptraum hatte.
I woke up drenched in sweat because I had a terrible nightmare.

The word is made up of 'Alp' and 'Traum' (dream). An 'Alp' is a mythical creature that people once believed caused bad dreams by sitting on the chest of the sleeping person.
Die alte Legende von dem Alp, der nachts kommt, hat mir als Kind Angst gemacht.
The old legend about the Alp that comes at night scared me as a child.
When referring to the dream, the fixed expression 'einen Alptraum haben' (to have a nightmare) is usually used. You can also say 'aus einem Alptraum aufwachen' (to wake up from a nightmare).
Er hatte einen schlimmen Alptraum, in dem er verfolgt wurde.
He had a terrible nightmare in which he was being chased.
The figurative meaning for a bad experience is often intensified by adjectives like 'absolut' (absolute), 'rein' (pure), or 'wahr' (true). The literal meaning (dream) usually does not need this intensification.
Die Renovierung unserer Wohnung war ein absoluter Alptraum.
Renovating our apartment was an absolute nightmare.
dream
'der Traum' and 'der Alptraum' are both connected to sleep and to images that you experience while asleep. A 'Traum' can be pleasant, strange, or even neutral. An 'Alptraum', on the other hand, is always very unpleasant or frightening. Learners may confuse the words because a nightmare is also a kind of dream. If you are speaking generally about experiences during sleep, 'Traum' fits. If you want to emphasize the fear or the bad part, 'Alptraum' is more precise.

Sie hatte vor der Prüfung einen Alptraum und war am Morgen sehr nervös.
She had a nightmare before the exam and was very nervous in the morning.
Nach dem Aufwachen konnte ich mich noch gut an meinen Traum erinnern.
After waking up, I could still remember my dream well.