It is an identifier. If you have two pages that include the exact content expect for some slight modification, then you do not want Google to penalise you for having duplicate content. Adding the code alongside which is the main one and which is the duplicate will prevent this. An example would be a page that sells a shirts. if you change the size of the shirt since you want to buy a black one, then the url may change to reflect this, allow this data to be passed onto the checkout page. Thus both pages are the same except for the colour of the shirt. You want google to treat all the pages the same but only to rank one in search i.e. the page you would land on from the navigation menu
It's used to prevent dup content issues to tell google which URL is the source article you want to rank.
Learn how to search. Result #1 Result #2 Result #3 If you can't learn how to search and use your own initiative, you won't get anywhere in SEO.
The rel=canonical is important tool for web developers who deal with a lot of duplicate content.It help us to remove duplicate content from our websites.