Final answer:
Adenine and guanine are purines with a double ring structure, while cytosine and thymine are pyrimidines with a single ring structure; thymine is unique to DNA.
Step-by-step explanation:
The nitrogen-containing bases adenine and guanine belong to the group known as purines, which are distinguished by their double ring structure. In contrast, cytosine and thymine belong to a group called pyrimidines, characterized by a single ring structure. These bases are critical for the structure of DNA, with adenine pairing with thymine through two hydrogen bonds, while cytosine pairs with guanine through three hydrogen bonds. Thymine is exclusive to DNA, whereas in RNA, thymine is replaced by uracil.