Oedipus was the son. Having been childless for some time, Laius consulted the Oracle of Apollo at Delphi. The Oracle prophesied that any son born to Laius would kill him. In an attempt to prevent this prophecy's fulfillment, Laius had his ankles pierced and tethered together so that he could not crawl; Jocasta (his queen) then gave the boy to a servant to abandon on the nearby mountain.
In short, King Laius of Thebes wished to thwart a prophecy, so he sent a servant to leave Oedipus to die in the wilderness. However, the shepherd took pity on the baby and passed him to another shepherd who gave Oedipus to another King.