Compare to = describe (someone or something) as being similar to (someone or something else); like: ‘She compared the child to a noisy monkey.’
Compare with = examine two or more people/things/idea etc. to discover similarities or differences: ‘Compared with the old dictionary, she found the new one more helpful.’