Jocasta, in Greek mythology, was the daughter of the king of Thebes, Menoeceus, and sister of Creon. She was the wife of Laius, who was given a prophecy saying that if he ever had a child, the child would kill him and marry his wife. However, one night, Laius drank too much and after sleeping with his wife, they had a son, Oedipus.
Jocasta and Laius pinned their sons' ankles together and then gave him to a shepherd, in order to take the baby to Mount Cithaeron and let him die. The shepherd pitied the helpless baby, and instead, gave him to another shepherd who worked under the King Polybus of Corinth. Polybus and his wife Merope were childless, so they happily took the child for their own and nurtured him.
No one had told Oedipus that Polybus and Merope were not his biological parents. So, when he consulted an oracle and was told that he was fated to kill his father and marry his mother, he fled from Corinth in order to avoid his ill fate. On his wanderings, he bumped upon a man and had a quarrel over who had right-of-way on the road. The heated argument ended up with Oedipus killing the man, not knowing that this man was in fact Laius, his biological father.
When he ended up in Thebes, he helped the locals get rid of the monster Sphinx, and he was given the throne of the city. He then married Jocasta, again not knowing that she was his mother. Jocasta and Oedipus had two daughters, Antigone and Ismene, and two sons, Eteocles and Polynices. Thebes was then struck by a plague, and that's when Oedipus and Jocasta realised the truth. Upon hearing the news, Oedipus plucked out his eyes, while Jocasta committed suicide.