der Traum
dream
A sequence of images, thoughts, and feelings that one experiences during sleep.
Ich hatte letzte Nacht einen sehr lebhaften Traum.
I had a very vivid dream last night.

dream
Loading your saved state.
dream
A sequence of images, thoughts, and feelings that one experiences during sleep.
Ich hatte letzte Nacht einen sehr lebhaften Traum.
I had a very vivid dream last night.

The noun 'der Traum' (dream) is closely related to the verb 'träumen' (to dream). Both words share the same stem and refer to the world of wishes and experiences during sleep.
Als Kind träumte ich davon, Astronaut zu werden.
As a child, I dreamed of becoming an astronaut.
Both the noun and the verb are very often used with the preposition 'von' (of/about) and the dative. This construction describes the content of the dream or wish.
Er erzählte mir von seinem Traum, ein eigenes Café zu eröffnen.
He told me about his dream of opening his own café.
When talking about sleep, 'Traum' (dream) is often combined with verbs such as 'einen Traum haben' (to have a dream), 'aus einem Traum erwachen' (to wake from a dream), or 'jemanden aus seinen Träumen reißen' (to tear someone from their dreams). A bad dream is called an 'Albtraum' (nightmare).
Ich hatte einen furchtbaren Albtraum und bin schweißgebadet aufgewacht.
I had a terrible nightmare and woke up drenched in sweat.
When a wish is meant, typical verbs are 'einen Traum verwirklichen' (to make a dream come true), 'seinen Traum leben' (to live one's dream), or 'einen Traum aufgeben' (to give up a dream). These phrases describe how one deals with one's life goals.
Mit dem neuen Job hat sie sich endlich einen großen Traum verwirklicht.
With the new job, she has finally made a big dream come true.
To describe something as ideal, you can use the construction 'ein Traum von einem/einer ...' (a dream of a ...). The word is used here to express very high appreciation.
Sie trug ein Traum von einem Abendkleid.
She was wearing a dream of an evening dress.
The idiom 'im Traum nicht daran denken' (to not dream of doing something) is a fixed structure. It is often expanded with a 'zu' infinitive construction to emphasize that one would absolutely never do something.
Ich würde im Traum nicht daran denken, meinen Job zu kündigen.
I wouldn't dream of quitting my job.
goal / destination / target
'das Ziel' and 'der Traum' can both describe something you want to achieve in the future. 'das Ziel' sounds more concrete and active: you work toward it and can plan steps. 'der Traum' emphasizes a big wish, often with a lot of feeling. It may be realistic, but it does not have to be. The words can be confused when someone talks about wishes in life. When clear planning is involved, 'Ziel' fits better. When it is about a strong personal wish, 'Traum' sounds more natural.

Seit seiner Kindheit ist es sein Traum, einmal in Japan zu leben.
Since childhood, it has been his dream to live in Japan someday.
Für dieses Jahr hat Lisa das Ziel, eine neue Ausbildung zu beginnen.
This year, Lisa’s goal is to start a new training program.