An accretion disk is rapidly spiraling matter that is in the process of falling into an astronomical object. In principle, any star could have an accretion disk, but in practice, accretion disks are often associated with highly collapsed stars such as black holes or neutron stars.
The matter that feeds the accretion disk can be obtained when a star passes through a region where the interstellar matter is thicker than normal. Usually, however, a star obtains matter for an accretion disk from a companion star. When two stars orbit each other, there is an invisible surface around each of the stars, called the Roche lobe. Each star is more or less at the center of one of these two teardrop-shaped surfaces, which touch at their points. The two Roche lobes represent all points where the gravitational potential of both stars is equal. Any matter on a Roche lobe can just as easily fall into either star. If one star in a binary system becomes larger than its Roche lobe, matter will fall from it onto the other star, forming an accretion disk.
The matter falling into a collapsing star hole tends to form a disk because a spherical mass of gas that is spinning will tend to flatten out. The faster it is spinning, the flatter it gets. So, if the falling material is orbiting the central mass, the spinning flattens the matter into an accretion disk.
Black holes are objects that have collapsed to the point that nothing, not even light, can escape their gravity. Because no light can escape, there is no way to directly observe a black hole. However, if the black hole has an accretion disk, we can observe the black hole indirectly by observing the behavior of the accretion disk, which will emit x rays.
Accretion disks can also occur with a white dwarf in a binary system. A white dwarf is a collapsed star that is the final stage in the evolution of stars similar to the Sun. White dwarfs contain as much mass as the Sun, compressed to about the size of Earth. Normally the nuclear reactions in a white dwarf have run out of fuel, but additional nuclear reactions may be fueled by hydrogen from the accretion disk falling onto the white dwarf. White dwarfs have some unusual properties that do not allow them to expand slowly to release the heat pressure generated by these nuclear reactions. This heat pressure therefore builds up until the surface of the white dwarf explodes. This type of explosion is called a nova (not the same as a supernova), and typically releases as much energy in the form of protons in less than a year as the Sun does in 100,000 years.