hreflang is a meta tag that is useful when one has translated pages of a website into several languages. Here's a sample of the hreflang meta tag at work on a page in English:
This is the canonical meta tag of the URL of a web page written in English:
and that English language page also contains this meta tag in its <head> which refers Google to a translation of that page into Spanish:
<link rel="alternate" hreflang="es" href="https://www.blah.com/spanish/thispageinspanish.php">
Looking at that tag, one can see that it refers to the original English page and it refers to a Spanish translation of that page. Google keeps track of such things.