Elvis impersonators have many similarities, such as long black sideburns and rhinestone-studded suits, that are not inherited. In the same way, biological similarities are not always due to inheritance.
For example, look at the skulls below. They belong to extinct animals, and both of them have saber teeth — long, ferocious canines with serrated edges. Would you guess that these saber teeth are homologous?
These two skulls certainly look like the animals could have inherited their saber teeth from a common ancestor with long teeth. And the presence of teeth themselves is definitely a homology, in that the common ancestor of these two had teeth, which were passed down to these descendents. However, the unusual length of these teeth is NOT homologous. One skull belongs to Thylacosmilus, a close relative of marsupial mammals. The other belongs to Smilodon, the saber-toothed cat, which is a placental mammal. Marsupial and placental mammals are very different and diverged from each other a long time ago.
Thylacosmilus is more closely related to marsupials such as kangaroos and koalas than it is to Smilodon. Smilodon is more closely related to other placentals such as housecats and elephants than it is to Thylacosmilus. Saber teeth are not a common trait in the marsupials closely related to Thylacosmilus, or in the placentals closely related to Smilodon. Their common ancestor certainly had teeth, but they were probably not adapted into fierce sabers.
That means that one lineage on one part of the tree of life evolved saber teeth from normal length teeth, and a different lineage somewhere else on the tree independently evolved saber teeth from normal length teeth. This is an example of convergent evolution. Both lineages evolved saber teeth, which likely helped them kill prey.