What is Analogy?

In literature or storytelling, an analogy is something that compares two things and expesses their certain similarities whereas otherwise they would be completely different.