How UGA ends a protein
At UGA the ribosome stops, just like at UAA and UAG — but the casting is different in bacteria: UGA is read by release factor RF2 (which handles UGA and UAA), while RF1 handles UAA and UAG. In eukaryotes a single factor, eRF1, terminates at all three stops. No tRNA has a normal anticodon for UGA.
That "no tRNA" clause is where UGA gets interesting — see below.
The selenocysteine exception
UGA is the only stop codon that cells deliberately translate. In a small set of genes — selenoproteins such as glutathione peroxidase and the deiodinase enzymes — UGA codes selenocysteine (Sec), nicknamed the 21st amino acid. The trick is a RNA hairpin called a SECIS element downstream of the UGA: it recruits a dedicated elongation factor that delivers a special Sec-tRNA, and the ribosome inserts selenocysteine instead of stopping.
The standard chart — and this site — lists UGA as plain stop, which is what intro courses and almost every gene expect. But if a textbook says "UGA codes the 21st amino acid," this is the paragraph it's summarizing.
What changing UGA does
Scan the table: only UGA→UAA (position 2) still spells stop. The other eight changes all code amino acids — including UGA→UGG, which swaps a stop for tryptophan, and the two cysteine codons UGU and UGC next door in position 3.
A stop→amino-acid change means readthrough: the protein continues past the intended end. In the reverse direction, any codon mutating into UGA (DNA: TGA) is a nonsense mutation that truncates the protein.
UGA on exams
Standard exam treatment: UGA/TGA = stop, full stop. If the question mentions selenocysteine or "the 21st amino acid," the expected point is the SECIS-dependent recoding above. Try TGA and TGG on the translator to see the difference one base makes.