Darwin studied medicine at Edinburgh University from 1825 to 1827 and entered Christ's College, Cambridge in 1828. After a course in biological studies he took his degree in 1831; at the end of the year he set out as a naturalist on board the H.M.S. Beagle on a scientific mission to South America. By the time of his return in 1836, he had become an authority on many forms of life. Between 1842 and 1844 he developed his theory of natural selection, the principle by which the organisms best suited to survival pass on their traits to the next generation, although he did not announce his work until 1858.
It is useful to distinguish Darwin's theory of natural selection from evolution generally. Darwin's contribution was not the hypothesis of evolution -- other naturalists such as Lamarck and Darwin's grandfather Erasmus Darwin anticipated him in this respect -- but in describing the mechanism by which evolution takes place. Natural selection is often described as "survival of the fittest"; it maintains that the organisms best suited to survive in their environment are more likely to reproduce and pass their genetic material to the next generation, while those with less advantageous traits are less likely to survive long enough to reproduce.
In 1859 he published a considerably expanded version of his researches in the controversial Origin of Species by Means of Natural Selection, followed by The Descent of Man in 1871.