The hreflang tag is an HTML attribute that tells search engines which language and regional version of a page should be served to users. It helps avoid duplicate content issues and improves user experience by delivering the most relevant version based on language and location.