In Watson and Crick's model of DNA, the double helix, the two strands of DNA are joined to one another by hydrogen bonds between the bases, this is called base pairing. These hydrogen bonds joining the bases pairs have a strength of 4-21 kJ mol-1. 
In DNA Adenine always pairs with Thymine and Cytosine always pairs with guanine. In RNA Uracil replaces Thymine, therefore in RNA Adenine always pairs with Uracil. Thyamine and Uracil or Adenine always only have two hydrogen bonds holding the bases together, whereas Guanine and Cytosine have three hydrogen bonds holding the two bases together. Consequently DNA with a larger proportion of Guanine and Cytosine, rather than Thyamine and Adenine is more stable and it takes more energy to break the two strands of DNA apart. 
The base pairing in the DNA helix helps to determine its structure. Becasue of the different interactions between the bases the dsDNA helix has completed a full turn on its axis every ten bases. Each Base allows the helix to turn thirty-six degrees. 
Purines and Pyrimidines
Adenine and guanine are both purine bases, this means that they have a double ringed structure. Cytosine, Uracil and Thymine are pyrimidines and have single ringed structures on the other hand. Purines only ever pair with pyrimidines and pyrimidines only ever pair with purines.This is one of the reasons why a transversional base pairing change can have such disasterous effects on the structure of a protein as hydrogen bonds will not occur between two purines or two pyrimidine.  Before Watson and Crick presented the structure of DNA, Erwin Chargaff in the 1950's discovered a chemical technique in which he could determine the molar concentration of any one of the bases in a source of DNA. From what Chargaff discovered he noticed some patterns in the molar concentrations of the bases, from his results he devised some rules. 
Chargaff's Rules 
- The amount of Adenine is the same as the amount of Thymine. [A] = [T]
- The amount of Guanine is the same as that of Cytosine. [G] = [C]
- The number of purine bases in equal to the number of pyrimidine bases. [A] + [G] = [T] + [C]
In the DNA double helix, as well as the bases being complementary base paired they are also stacked on top of one another. These bases also have interactions (Van der Waals) happening between one another which also contribute towards the DNA's structure. Base stacking in this way creates a hydrophobic core on the DNA. 
1) Berg, J. Stryer, L. Tymoczko, J.. (2007). DNA, RNA, and the Flow of Genetic Information. In: Ahr, K. et al. Biochemistry. 6th ed. New York: W.H. Freeman and Company. p107-112.
2) Hartyl, D. Jones, E.. (2005). DNA Structure and DNA Manipulation. In: Weaver, S. et Al. Genetics, Analysis of Genes and Genomes. 6th ed. Sudbury,: Jones and Bartlett Publishers. p46-52.