Both knowing of the prophecy, Laius and Jocasta give the boy to a shepard. The shepard's task is to leave the boy on a mountainside to die.
Upon arriving on the mountainside, the shepard found that he didn't have the heart to leave the boy to die. Instead, he entrusted his life with a fellow shepard, a Corinthian. He told the other shepard to take him away, to a safe place.
The boy ended up in Corinth. The Corinthian shepard was a servant of Polybus, king of Corinth. Polybus was childless, so he gladly adopted the boy. He gave him the name Oedipus, which means "swollen-foot". Oedipus was brought up to manhood over the course of his time in Corinth. Some time later, he finds out Polybus and his wife aren't his real parents, so he flees Corinth.