The term "residue" refers to the amino acids that make up the structure of a protein. Hemes are not residues in a protein since they are not amino acids. Hemes are a molecule that consists of a porphyrin ring structure (a large aromatic ring with nitrogen atoms in the middle) that has an iron bound in the center. They are often bound to proteins. Non-amino acid molecules that are bound to proteins and impart some function to the overall protein are called co-factors rather than residues. Hemes can also be tightly associated with residues in a protein and even covalently bound (ie. cytochrome c), but even then, they aren't considered to be residues.
In a PDB file, the atom locations of cofactor molecules (I believe heme is abbreviated HEM) are typically listed after the amino acid residues in the protein and before the water molecules.
Here you have a PDB example with a cytochrome. As it was already pointed out, all the atoms in the heme group have the identification of HEM in the PDB file. You can extract them easily with a text editor.