A codon is a triplet sequence on mRNA that codes for a specific amino acid. The anticodon is on a tRNA and it complements the codon on the mRNA. So for example if you had 5′-AGG-3′ on the mRNA, the anticodon on the tRNA would be 3′-UCC-5′.
The relationship is that a certain enzyme recognizes the anticodon and allows the tRNA to bind to the site on the ribosome with the correct codon, allowing protein synthesis to continue.
Sorry if this is kind of confusing, it’s a long process lol I was trying to condense it.