The first one has - connected and the others do not have, this two seem to have the same meaning but my teacher say not, what is the difference between them?
In general, hyphens are used to construct compound adjectives:
- I had to catch an early-morning train.
- I like late-night television.
- She wears extra-large socks.
Hyphens are not used when the words stand alone. So, to use your examples:
- It was a once-in-a-lifetime trip (a trip so special or expensive that one would be unlikely to undertake such a trip more than once, and once-in-a-lifetime acts as an adjective).
- We are born once in a lifetime (literally, this event happens exactly once, and the four words stand alone to describe that fact).