Step 1: Classify. Nucleic acids are polymers, and the monomer is the nucleotide. So the whole structure can be described as base + sugar + phosphate, repeated many times.
Step 2: Nucleoside versus nucleotide. Base + sugar (linked at the 1' carbon of the sugar through an N-glycosidic bond) = nucleoside. Nucleoside + phosphate (esterified at the 5' carbon) = nucleotide.
Step 3: Two families. DNA uses deoxyribose sugar and the bases A, G, C, T. RNA uses ribose sugar and the bases A, G, C, U. Adenine and guanine are double-ring purines; cytosine, thymine and uracil are single-ring pyrimidines.
Step 4: The backbone. Successive nucleotides are joined by phosphodiester linkages between the 3' and 5' carbons of neighbouring sugars, giving a repeating sugar-phosphate backbone with a free 5'-phosphate end and a free 3'-OH end.
Step 5: Higher structure. DNA is a double helix of two antiparallel strands whose bases pair specifically (A with T, G with C) through hydrogen bonds, so the base sequence of one strand fixes that of the other. This complementary pairing is the key to replication and to storing genetic information. Most RNA is single-stranded and helps in protein synthesis.