Rel=”canonical” is not a direct ranking factor, but it can influence rankings either negatively or positively (depending on the implementation), because rel=”canonical” is a hint that Google honors strongly (watch John Mueller explaining how Google can ignore it, when content the linked URLs are not duplicate or near-duplicates).
Used to consolidate duplicate content, PageRank, links and ranking signals into one canonical page, rel canonical is an indirect ranking factor. See the official documentation on how to choose a canonical page, at https://support.google.com/webmasters/answer/139066?hl=en
To find duplicate or near-duplicate content, Google uses their patented Simhash algorithm, which breaks down pages into blocks of content, then calculates unique identifiers for every content block, and composes a hash, or “fingerprint”, for each page.