DNA is made of of three basic components. Phosphate groups (which give the DNA molecules a negative charge), deoxyribose sugar (ribose sugar is found in RNA), and nitrogeneous bases (4 types: (A) adenine, (T) thymine, (G) guanine, and (C) Cytosine). These nitrogeneous bases are split into purine bases (double-ringed) and pyrimidine bases (single-ringed). The purine bases are guanine and adenine. The pyrimidine bases are thymine and cytosine.
Always remember, A always goes with T and C always goes with G. Why always A with T and C with G, you ask? It can only be this way because it's the opportunity to form hydrogen bonds between them. Purines can only go with pyrimidines because of their structures. But, the only exception is in RNA, where there is no thymine. Thymine is replaced with (U) Uracil.
In the picture below, see how their strustures fit together like puzzle pieces?