KIng Laius and Queen Jocasta of Thebes learned from an oracle that they their newborn son would kill his father and marry his mother. The king and Queen gave their baby to a Shepherd with orders to kill the baby.
The Shepherd didn't do his duty so Oedipus grew up to be the prince of another city (Corinth), he believed that they were his actual parents, Oedipus ended up ran away...
Oedipus traveled to the city of Thebes where his actual parents rule unknowingly. He found out the city was cursed by the monster Sphinx , saved the city by lifting the curse by solving Sphinx's riddle.
Oedipus ended up crossing paths with his dad not knowing he was his dad, they got into a big altercation and Oedipus killed his dad.
Because Oedipus saved the city of Thebes the Queen wanted to repay him so she married her son (both not knowing they were related) and they had four children.
Oedipus and his mom found out they're relations she killed herself and he refused to be the king anymore and his two sons took turns to be king, one of the sons became stingy about sharing the king position, they went to war with each other and ended up killing each other.