Myths and legends of old are stories that were created at some point in time, whether they contain a kernel of truth or not. They are usually intended to convey some moral or life lesson to the audience. Be loyal to your king. Respect nature. Don’t cry wolf. Stuff like that.
They originate in times of oral traditions, meaning that the stories were passed down diachronically (from generation to generation) or synchronically (from storyteller to storyteller).
I know I’m not the first one to state this, but comic book heroes are our modern-day mythology.