The key difference between pyridine and pyrimidine is that pyridine structure resembles the structure of benzene with one methyl group replaced by a nitrogen atom, whereas pyrimidine structure, though it too resembles the structure of benzene, has two methyl groups replaced by nitrogen atoms.
Pyridine and pyrimidine are organic compounds. These are named as heterocyclic organic compounds because they are cyclic structures having two different types of atoms making the ring. These ring structures contain carbon and nitrogen atoms.