Abarim Publications' online Biblical Hebrew Dictionary
Scholars have identified three different roots of the form עלם ('lm) in the Bible. They are formally not related but a poetic audience may readily think otherwise (see note):
The verb עלם ('alam), meaning to be hidden or concealed (Psalm 90:8, 1 Kings 10:3, Nahum 3:11). This root comes with the derivation תעלמה (ta'alumma), meaning hidden thing (Job 11:6).
The unused and assumed root עלם ('lm II), which yields the derivation עלם ('elem), meaning young man. The female form of this word, עלמה ('alma), means young woman. And עלומים ('alumim) means youth in general.
The unused and assumed root עלם ('lm III), which gives us the word עולם (olam), meaning forever, ever, everlasting. According to HAW Theological Wordbook of the Old Testament, twenty instances of this word's more than three hundred occurrences in the Bible denote a very long but not limitless past.
The connection between roots II and III may have to do with the many years a youth has in front of him, but the connection with root I is obscure. Perhaps it alludes to the hidden secrets of the future.