In organic chemistry, a heterocyclic ring is a ring structure that contains more than one type of atom. Thus the name: "hetero" meaning "different", "cyclic" meaning "ring". Heterocyclic rings are contrasted with homocyclic rings.
Carbon is (in biological terms) the only element that can form stable homocyclic rings. The stability of carbon-carbon bonds means that carbon can quite easily form ring systems with different amounts of atoms, although 5 and 6 atom groups are most common. Heterocyclic rings are created by replacing one (or more) of those carbon atoms with an atom of another (or several) elements. In biochemistry, this is usually either oxygen, nitrogen or sulfur, although heterocyclic rings that incorporate metallic elements are also possible.
Heterocyclic rings are one of the things that make organic chemistry so complicated. The replacement of a carbon by another element change the stability and electrostatics of a ring system. The different configurations and replacements of atoms in complicated heterocyclic ring structures quickly lead to factorial large numbers. While this is quite hard to keep track of and to understand, the different properties of the molecules involved also make life possible.