A canonical tag tells the search engine what the primary URL of a page is. For example, if you have a web shop in clothing where the content of the products is identical and only the color differs, the search engine will see this as duplicate content. Search engines only want to show the highest quality results and duplicates do not help.
By placing a canonical tag on the pages where it is needed, you indicate to the search engine which page is the main page. This is where the search engine will assign the most value.