When I'm swimming in the ocean and see a vertical fin above the water in the distance, I always freak out and think it's a shark even though it always turns out to be dolphins. Dolphins evolved from a four-legged mammal that might have looked something like a hippo, and the dolphin's fin and the shark's fin are coded for by totally different genes, and have totally different evolutionary pathways. Traits that look the same but evolved separately are called analogies.
Homologies are traits that share a common evolutionary pathway and the same genes that code for them. The range of morphology of vertebrate forelimbs is incredible, but they all have the same genetic source, and thus share most of the same bones.