The anatomically different structures evolved towards the same function due to adaptations to similar needs or similar habitats. This is called the convergent evolution because anatomically dissimilar and origin-wise different structures converge towards the common function. Hence, analogous structures are the result of convergent evolution.
Flippers of Penguins and Dolphins: Penguin (a bird) and Dolphin (a mammal), both have flippers that serve the common function of swimming although have different internal structures and origins.