As shown on the NIH Genetics Home Reference site, when DNA molecules are represented as ladders, the rungs represent the base pairs of the DNA. The bases in DNA are often represented as G, A, T and C, which stand for guanine, adenine, thymine and cytosine. When two strands of DNA form a double-strand helix, the bases pair up in the middle of the molecule.
The bases in DNA are not all the same size. This affects how they can pair in the middle of a molecule. The larger two bases are guanine and adenine, which are called purines. The smaller two bases, known as pyrimidines, are thymine and cytosine. The sugar phosphate backbone of the DNA molecules is held the same distance apart through the entire length of the double helix. As a result, purines must pair with pyrimidines. If two pyrimidines paired, the base pair would not be wide enough to fill the center of the double helix. If two purines paired, the base pair would be too wide for the DNA molecule. The purine-pyrimidine pairs are specifically A to T and G to C because the different bases are able to form either two or three hydrogen bonds. The A to T and G to C base pairs tend to happen because these pairings are formed by one purine and one pyrimidine, both of which are able to form the same number of hydrogen bonds.