A canonical URL is the single version of a page that you designate as the primary one when the same or very similar content is reachable at multiple URLs. You declare it with a rel="canonical" tag in the page's HTML.
Duplicate URLs happen constantly without anyone intending them. The same product page might be reachable at example.com/service, example.com/service?ref=email, and www.example.com/service. To a person these look identical; to Google they are three separate URLs with the same content. A canonical tag says "these are all the same page, and this one is the real one."
