My question is about changes on base-pairs versus addition of new ones. I see how base pairs could change but not how new ones could be added because I would think that the addition of any new ones would throw off the entire codon sequence. I also doesn’t understand how it could happen in the first place, with cellular defense mechanisms and the low probability that any resulting addition/change would actually be viable, and match up to a corresponding codon.
I looked on talkorigins but couldn’t find anything.
The answer is basically that it doesn’t happen, or if it does so it happens extremely rarely, for exactly the reasons you mention: there is no mechanism for it to happen, and it would throw off the entire coding sequence for some genes.
The way that additional sequences may be added to the genome is by duplicating a long strech of codons that includes an entire gene. In this case the organism will simple have two copies of the same gene, and although it may produce excess gene product this may not be fatal (and may even be advantageous). Once this happens, mutations can then affect the second copy without damaging the ability of the original gene to function, so that the second copy may eventually acquire a new function.
Within coding regions, insertions or deletions of single base pairs are mostly detrimental as you suggest–they are “frameshift mutations” result in non-functional protein–and are generally weeded out by natural selection. However, not all sequence is coding sequence. In most multicellular organisms, most DNA is not coding sequence. Furthermore, within coding sequences the insertion or deletion of three bases, or any multiple of three bases, does not lead to a frameshift, and may leave the protein’s function intact (or even improve it). If you compare orthologous genes from different organisms, you’ll find lots of insertions and deletions like this.
I should have clarified that I was speaking about single base-pair insertions; as SomeGuy indicates, insertions of 3-base multiples don’t have as severe an effect. Also, I shouldn’t have said there is “no mechanism” for such small insertions; such insertions may happen due to “slippage” during DNA replication, or by the action of what are known as “intercalating” mutagens, which insert themselves between neighboring base pairs and allow another base pair to become inserted.