Stellar accretion refers to the inflow of ambient gas onto the surface of a star. During the process of star formation, accretion builds up the object to its final mass. The infalling gas is the interior portion of a dense core, a small molecular cloud that collapses under the influence of its own gravity. The object being built up in this manner is a protostar and represents the first phase of stellar evolution. Some infalling gas impacts the protostar directly. Much of the gas, however, has sufficient angular momentum that it goes into orbit around the young star. The accreting gas thus creates a circumstellar disk. Matter spirals in through the disk onto the surface of the protostar. The remaining part of the disk eventually gives rise to planets.