When gas, dust or other kinds of matter fall towards a compact object (such as a black hole or a neutron star), a disk of infalling matter forms around the central object called the accretion disk.

The energy that matter gains in its fall is transformed into heat energy of the disk matter. Consequently, accretion disks are, as a rule, extremely hot. Their thermal radiation they emit is an important tool for indirect observation of neutron stars and black hole.

Within the disk, matter spirals around and around, coming closer and closer to the central object until at last it falls onto its surface (or, in the case of a black hole, through its event horizon).