Define canonicalization and does canonical issue affect the page rank?

Where do we insert the canonical code on the back of the website and if there is a canonical issue in the website will it have an adverse effect to the PR?