Earth began forming over 4.6 billion years ago from a cloud of gas and dust that also formed the Sun and other planets. As the solar system developed, small objects called planetesimals collided and stuck together, eventually forming Earth. When Earth first formed, it was a hot molten planet bombarded by asteroids and comets. As it cooled over millions of years, the first life forms of bacteria emerged and the oceans and atmosphere developed. Today, Earth is a complex system made up of interacting spheres including the atmosphere, biosphere, geosphere, hydrosphere, and cryosphere that sustain life.