The process by which an object increases its mass under the influence of its gravitational attraction. Accretion plays a key role in a wide range of astrophysical phenomena. In particular stars result from the accretion of material by a protostar from a surrounding molecular cloud. The accumulation of mass on the protostar involves the formation of an accretion disk. Theoretical and observational investigations of protostars and newborn stars indicate the important role of magnetic fields in this process. They favor the magnetospheric accretion model for mass transfer from the circumstellar disk onto the newborn star. In this model, the stellar magnetosphere truncates the disk at a few stellar radii. Gas from the disk accretes onto the star along the magnetic field lines and hits the stellar surface at approximately the free fall velocity, causing a strong accretion shock. Various emission lines are formed in the infalling magnetospheric flow. Moreover, optical/ultraviolet excess continuum emission is produced in the accretion shocks. The accretion is accompanied by mass ejection through collimated bipolar jets.