The Story Behind Dreams?

Why do people dream? And why do we dream what we do? I have some wierd dreams and I’ve heard they have something to do with out subconscious interpritating things. But I’ve also head that it’s just our brains blowing off steam after the day is done. So what is the real story behind dreams and how do you determine what they really mean if they mean anything at all?! Thanks