On the outside, a dolphin, a fish, and a penguin look very similar, and the extinct marine reptiles known as ichthyosaurs look much like a fish as well. They all have a pointed snout, smooth tapered bodies to create less drag in the water, some combination of flippers and fins, and most have a tail
Likewise, a bat, a robin, and a pterodactyl look very similar, because they all have bodies adapted for flight. But we can tell that these animals are not closely related, because all of their internal anatomy shows they are members of completely different groups. A dolphin is a mammal, a penguin is a bird, an ichthyosaur is a reptile, and a fish is not closely related to any of these. Likewise, a bat is a mammal, a robin is a bird, and a pterosaur is a reptile.
In both of these cases, convergent evolution has sculpted their bodies so they are well adapted for a particular function like swimming or flying, yet these animals are not closely related. Convergent evolution is a common thing in nature, because there only so many ways to build a fast swimmer or an aerial flyer.