Homologous organs are similar in origin (or are embryologically similar) but perform different functions. For example, the forelimbs of humans and the wings of birds look different externally but their skeletal structure is similar. It means that their origin is similar (as wings in birds are modifications of forearm) but functions are different - the wings help in flight whereas human forearm helps in various activities.
Analogous organs, on the other hand, have different origin but perform similar functions. For example, the wings of a bird and a bat are similar in function but this similarity does not mean that these animals are more closely related. If we carefully look at these structures, then we will find that the wings of a bat are just the folds of skin that are stretched between its fingers whereas the wings of birds are present all along the arm. Therefore, these organs are analogous organs.