There might be a discrepancy between two pages having similar or almost similar URLs. In such a scenario, canonical tags are used which inform a search engine about the page to be used. Thus, if you have a product that has been listed on multiple websites, search engines would decide which website to reference it with by looking at the canonical tag. It comes as a part of the HTML head tag.