A canonical tag decides which URL collects your ranking signals.
Most pages exist at more than one address — with and without a trailing slash, with tracking parameters, on http and https, sometimes on a www mirror. The canonical tag tells search and AI engines which one is the real page, so links, relevance, and citation signals consolidate on a single URL instead of being split across duplicates that each rank worse than the combined page would.