How is a canonical working?

The rel=”canonical” link attribute, also known as a “canonical tag”, is a way for webmasters to indicate to search engines which version of a page is the preferred or “canonical” …