That the Earth rotates around its axis, said in the treatise of Copernicus, issued in 1543. But on the issue that causes it to spin, there are many hypotheses.
The most common theory explains the processes going on during the formation of the planets. Clouds of cosmic dust "would bunch together, forming the nuclei of the planets, they attracted other more or less large space body. The collision of these bodies and were able to impart rotation to the future planets. And then the planet continued to rotate by inertia.
However, there are mysteries. For example, six planets in the Solar system rotate in one direction, and only Venus is in the opposite (and Uranus rotates practically lying on his side, that is, on this planet there is no change of day and night). The speed of rotation of the Earth is not constant - not fully understandable reasons, it can vary in either direction by thousandths of a second.
In General, the Earth slows its rotation every 100 years time, the total turnover increased by 0,0024 seconds. This is attributed to the influence of the moon. Lunar gravity causes the Earth and tides, and the movement of masses of water requires energy, which is taken from the energy of rotational motion of the Earth. Slowly all the planets of the Solar system rotates around its axis Venus - its day is longer than the earth in 243 times, the "fast" - Jupiter (its period of rotation is 9,925 hours) and Saturn (he commits a turnover of over 10 hours 34 minutes).