Both adenine and guanine have a two-ring core (benzene and imidazole = purine), so they are called purine bases. Both take part in DNA and RNA.
Other bases have a single ring (pyrimidine), and they are called pyrimidine bases; there are 3 major ones:
Cytosine (C): 2-oxo-4-aminopyrimidine
Uracil (U): 2,4-dioxopyrimidine
Thymine (T): 2,4-dioxo-5-methylpyrimidine
C and T take part in DNA, C and U in RNA.