The basis for the genetic code:
During translation (the making of protein from an RNA template), the amino acids (the building blocks of proteins) are attached to transfer RNA (tRNA). The ribosome, which is the protein making machinery, matches up the tRNA with the mRNA (which is the RNA encoding the protein). The code is the chunk of RNA that is matched up between the mRNA and the tRNA. Since each kind of tRNA is only attached to a specific amino acid, the 3-nucleotide code refers to only one possible amino acid. Three of the codes stand for no amino acid, and signals the end of the protein.
By looking at the code, you'll notice that it is degenerate, meaning that there is more than one code for some amino acids. This is explained by the fact that the third position is 'wobbly', in that the matchup between the mRNA and tRNA need not be perfect for some of the codes.
Each three letter 'word' of the genetic code is called a codon.