The canonical tag identifies which version of an address to use when there are multiple ways to access the same page - eg. example.com, www.example.com, example.com/index.php, www,example.com/index.php and the canonical tag says which of those four the search engine is to use since they are all the same page