To compare means to say how two things are the same and different.
If you compare cats and dogs, you’ll see that they’re both good pets.
Example picture