A canonical URL is the "main" address of a piece of content, declared in the page code. It tells search engines which version to index when the same content is available under several addresses – with campaign parameters, with and without a trailing slash, in a print version.
The problem it solves: duplicates. A store with filters can generate dozens of addresses for the same product list, and links and ranking signals scatter across them. The canonical tag consolidates them into one designated address, so all the accumulated SEO value works for a single version.
Canonicals also help when you deliberately publish the same content in several places – say, an article on a partner's site: pointing at the original protects either version from being treated as a copy.
Warning sign: a wrong canonical fails quietly and painfully. A page declaring another page as its "main" version can vanish from the index without a message. After any major site change it's worth checking canonicals in Google Search Console; during migrations it's a mandatory step.