If two waves share phase, they are coherent, and if the maximum of one wave coincides with the maximum of another, the two waves combine to increased intensity. If two waves are coherent, and the maximum of one wave coincides with the minimum of another wave, the two waves will cancel each other. Atoms in an ordinary light source radiate independently, usually emitting incoherent radiation. The points on the edge of the object act as a source of coherent waves that interfere with each other. The shape of the edge of the object is not exactly reproduced because part of the wave front is cut off.
Diffraction also occurs when light passes through an opening such as a lens.
The atoms in common light sources produce light by spontaneous emission. If an atom absorbs energy and one of its electrons is boosted to a higher orbital, the atom is said to be excited. When the electron drops back to a lower orbital, it emits light. If enough atoms are excited, stimulated emission can occur. Light of a particular wavelength can produce additional coherent light with the same phase and direction.