Oedipus was a king of Thebes. When he was born there was a prophecy that he would murder his father and marry his mother. Because of this, his parents had a soldier carry him away to kill him. However, the soldier couldn't go through with it and instead gave him to a farmer to raise as his own.
Years later, when Oedipus was grown, Thebes was being plagued by the sphinx, who would wait by the roadside and ask every passerby a riddle and when they couldn't answer correctly they would be killed. Oedipus came to Thebes to try his luck at the riddle, but on the way he met a traveler, got into an argument and killed him. The traveler was his father, the king, who had been going to try and find help against the sphinx.
When Oedipus arrived at Thebes he was questioned by the sphinx, but was successful in answering the riddle, and the sphinx in disgrace killed herself. In gratitude for freeing them the people of Thebes made Oedipus their king, to replace the one who had not come back, and Oedipus married the queen, who was really his mother.
It was not until much later that the truth of who Oedipus really was, was revealed. In horror at what he had done he gouged out his own eyes, and wandered the rest of his days.