<P> Because of the conservation of angular momentum, the nebula spun faster as it collapsed . As the material within the nebula condensed, the atoms within it began to collide with increasing frequency, converting their kinetic energy into heat . The centre, where most of the mass collected, became increasingly hotter than the surrounding disc . Over about 100,000 years, the competing forces of gravity, gas pressure, magnetic fields, and rotation caused the contracting nebula to flatten into a spinning protoplanetary disc with a diameter of about 200 AU and form a hot, dense protostar (a star in which hydrogen fusion has not yet begun) at the centre . </P> <P> At this point in its evolution, the Sun is thought to have been a T Tauri star . Studies of T Tauri stars show that they are often accompanied by discs of pre-planetary matter with masses of 0.001--0.1 M . These discs extend to several hundred AU--the Hubble Space Telescope has observed protoplanetary discs of up to 1000 AU in diameter in star - forming regions such as the Orion Nebula--and are rather cool, reaching a surface temperature of only about 1000 kelvin at their hottest . Within 50 million years, the temperature and pressure at the core of the Sun became so great that its hydrogen began to fuse, creating an internal source of energy that countered gravitational contraction until hydrostatic equilibrium was achieved . This marked the Sun's entry into the prime phase of its life, known as the main sequence . Main - sequence stars derive energy from the fusion of hydrogen into helium in their cores . The Sun remains a main - sequence star today . </P> <P> The various planets are thought to have formed from the solar nebula, the disc - shaped cloud of gas and dust left over from the Sun's formation . The currently accepted method by which the planets formed is accretion, in which the planets began as dust grains in orbit around the central protostar . Through direct contact, these grains formed into clumps up to 200 metres in diameter, which in turn collided to form larger bodies (planetesimals) of ~ 10 kilometres (km) in size . These gradually increased through further collisions, growing at the rate of centimetres per year over the course of the next few million years . </P> <P> The inner Solar System, the region of the Solar System inside 4 AU, was too warm for volatile molecules like water and methane to condense, so the planetesimals that formed there could only form from compounds with high melting points, such as metals (like iron, nickel, and aluminium) and rocky silicates . These rocky bodies would become the terrestrial planets (Mercury, Venus, Earth, and Mars). These compounds are quite rare in the Universe, comprising only 0.6% of the mass of the nebula, so the terrestrial planets could not grow very large . The terrestrial embryos grew to about 0.05 Earth masses (M) and ceased accumulating matter about 100,000 years after the formation of the Sun; subsequent collisions and mergers between these planet - sized bodies allowed terrestrial planets to grow to their present sizes (see Terrestrial planets below). </P>

Where did the elements that formed planets come from