An analogy is a comparison between two things that are similar in some way. When you draw an analogy between two different things, you are comparing them because you want to make a concept easier to understand.
There is a difference between superficial analogies and profound analogies. Two things might look alike, but work quite differently, or they might look different, but work in ways like each other. Most effort is put into finding profound analogies which teach us something worth knowing. As another philosopher puts is: