The sun, the earth, and the rest of the solar system formed from a nebular cloud of dust and gas 4.6 billion years ago. The early earth was very different from the planet we live on today. The origin of the universe remains one of the greatest questions in science. Early in the history of the universe, matter, primarily the light atoms hydrogen and helium, clumped together by gravitational attraction to form countless trillions of stars. Billions of galaxies, each of which is a gravitationally bound cluster of billions of stars, now form most of the visible mass in the universe.
Stars produce energy from nuclear reactions, primarily the fusion of hydrogen to form helium.
These and other processes in stars have led to the formation of all the other elements. The sun, an average star, is the central and largest body in the solar system. Most objects in the solar systems are in regular and predicatable motion. Gravity is the force that keeps planets in orbit aroundthe sun and governs the rest of the motion in the solar system. Gravity alone holds us to the earth's surface and explains the phenomena of the tides.