the king+queen of thebes get a prophecy saying if they have a child, it will grow up, kill its father and marry its mother.... but they have one anyway, then they're like "oops that was stupid" so they tell some shepherd dude (i'm paraphrasing, if you hadnt noticed) to take him away and leave him to die, but instead, he gives him to a different shepherd dude who takes him to corinth, the next town over, and gives him to the king+queen there who are impotent or sommat, so he grows up, and at one point he goes to an oracle and gets the prophecy "you will kill your father and marry your mother" so promptly, he flees what he believes to be his hometown to prevent this from happening. naturally, he ends up back in thebes, kills his father unknowingly and gets intimate with his mom, thus fulfilling the prophecies.
the horrible part is that his original intent when he left corinth was to NOT have the prophecy happening
I absolutely hate it when people try really hard for something not to happen, and it does. For instance, becoming like their parents - sometimes this works out for people, but other times they just end up back where they started. It's sad.