The Earth's rotation is primarily caused by its initial angular momentum, which was acquired during the formation of the solar system. The specific process by which the Earth acquired its rotation is known as the conservation of angular momentum.
When the solar system formed about 4.5 billion years ago, a rotating disk of gas and dust called the protoplanetary disk surrounded a young Sun. As the disk gradually collapsed due to gravity, it began to spin faster to conserve angular momentum. Within this spinning disk, particles came together through accretion to form larger bodies, including the Earth.
The accumulation of matter during the Earth's formation caused its rotation rate to increase. As particles fell towards the center of mass, their individual angular momenta added up to create the overall angular momentum of the Earth. This angular momentum is conserved, meaning that as the collapsing cloud of gas and dust contracted, its rotation sped up.
Over time, as the Earth continued to evolve and solidify, its rotation rate gradually decreased due to various factors. The most significant factor is the gravitational interaction between the Earth and the Moon. Through tidal forces, the Moon's gravitational pull has been gradually slowing down the Earth's rotation over billions of years. This process has led to a lengthening of the day by a small amount each year.
In summary, the Earth's rotation is primarily a result of the initial angular momentum acquired during its formation, and its gradual slowing down is influenced by tidal forces from the Moon.