Is only one of them correct? Are they used in different situations? Or are they interchangeable?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
From Strunk and White:
Use "compared with" when you are looking for differences.
E.g. CEO’s now earn 419 times the pay of blue-collar workers, compared with 42 times their pay in the 1980's.
Use "compared to" when highlighting (or comparing) the similarities of one thing to another.
E.g. The human heart can be compared to a pump.
I have always found this distinction to be counterintuitive. "With" suggests closeness, i.e., similarity; while "to" connotes distance, as in "going to".
Therefore, the way I always remember the difference is: They are the opposite of what they should be.