That’s exactly it. The ‘canonical’ tag tells Google what URL you want it to use for that page. It’s particularly useful when you have multiple routes to a page, eg with/without www. on the front (although there are better ways of getting round that), with/without index.htm on the end, where you’ve got a query or rewritten URL the comes in different forms, etc. Using it ensures that Google will treat all the variations as a single page, rather than indexing them all separately.