In astrophysics, accretion is the accumulation of particles into a massive object by gravitationally attracting more matter, typically gaseous matter, in an accretion disk. Most astronomical objects, such as galaxies, stars, and planets, are formed by accretion processes.
Stars are thought to form inside giant clouds of cold molecular hydrogen—giant molecular clouds of roughly 300,000 M☉ and 65 light-years (20 pc) in diameter. Over millions of years, giant molecular clouds are prone to collapse and fragmentation. These fragments then form small, dense cores, which in turn collapse into stars. The cores range in mass from a fraction to several times that of the Sun and are called protostellar (protosolar) nebulae.
As the collapse continues, conservation of angular momentum dictates that the rotation of the infalling envelope accelerates, which eventually forms a disk.
The disk eventually disappears due to accretion onto the central star, planet formation, ejection by jets, and photoevaporation by ultraviolet radiation from the central star and nearby stars. As a result, the young star becomes a weakly lined T Tauri star, which, over hundreds of millions of years, evolves into an ordinary Sun-like star, dependent on its initial mass.