The genetic codes are universal, with few exceptions and mitochondrial DNA includes some of these exceptions. For most organisms the 'stop codons are 'UAA', UAG and 'UGA'. In vertebrate mitochondria 'AGA' and 'AGG' are also stop codons, but not 'UGA', which codes for tryptophan instead. Another codon 'AUA' codes for isoleucine in most organisms, but for methionine in vertebrate mitochondrial mRNA.
There are many other variations among the codes used by other mitochondrial mRNA, which are not harmful to these organisms and can be used as a tool (along with other mutations among the mtDNA/ RNA of different species) to determine relative proximity of common ancestry of related species.
The more related any two species are, the more mtDNA/ RNA mutations will be the same in their mitochondrial genome. From this, it is estimated that the first mitochondria arose around 1.5 billion years ago. A generally accepted hypothesis is that mitochondria originated as an aerobic prokaryote in a symbiotic relationship within an anaerobic eukaryote.