Homology involves the study of organs that have evolved from same origin or from common ancestor but have different functions. For example, wings of bat and hands of humans.
Analogy involves the study of organs that are evolved from different ancestors but perform a similar function.
For example, wings of bat and wings of insects.