A nonsense codon has the effect of prematurely stopping the transcription of RNA or DNA and preventing the effective synthesis of polypeptide chains. DNA works by coding the instructions for protein synthesis. This is accomplished by cellular machinery assembling amino acids into long chains that, when the sequence is terminated, fold into proteins. A premature stop instruction cuts the process short and prevents the synthesis of useful proteins.
The genetic machinery uses short sequences of nucleotides to indicate the start and stop locations for transcription. Between these start and stop signals lie the active genes that code for building functional proteins. Occasionally, a single-point mutation alters a sequence in these instructions and transforms a short stretch of nucleotides into a stop signal, such as TAG or TAA, that prematurely instructs the messenger RNA to halt production of a peptide chain and release it in its unfinished state.
An analogy for what nonsense codons do would be the words "the end" appearing in the middle of a chapter rather than at the end of a book. If the reader was slavishly obedient to instructions, as mRNA is, the story would never be finished and the later chapters of the book would go unread. In the cell, this accident usually produces nonfunctional, or "nonsense," proteins that cannot function without critical parts of their structure.