This is a great question. Let me start off with some preliminary points that will help you. First, we need to realize that Greek mythology is very fragmented. Not only are the sources all over the place and fragmentary, but there are also many variations of myth. Timothy Gantz's book, Greek Mythology, does a great job with these variations. So, if you want to read about Greek mythology, this is a great place to start.
Second, as for Oedipus, there was a oracle about him, which was given to his father Laius. When Laius was a house guest of Pelops, Laius acted criminally by raping Chrysippus. This was a huge breech in hospitality, which was taboo in the ancient world. This was even considered as a transgression among the gods. For this act a curse was placed on Laius and his family. An oracle stated that he was die at the hand of his son.
When Laius heard about this, he told Jocasta (his wife) to get rid of the child, but she did not. She gave him to a shepherd to be exposed. This is understandable; how can a mother kill her own son? Needless to say, the child survived and Oedipus does wind up killing his father and even marrying his mother. Here we start the Theban trilogy.