Analogy is the comparison of two pairs which have the same relationship. The key is to ascertain the relationship between the first so you can choose the correct second pair. Part to whole, opposites, results of are types of relationships you should find.
Example:
hot is to cold as fire is to ice OR hot:cold::fire:ice