Since a phylogenetic tree is a hypothesis about evolutionary relationships,
we want to use characters that are reliable indicators of common ancestry to build that tree.
We use homologous
characters  characters in different organisms that are similar
because they were inherited from a common ancestor that also had that
character. An example of homologous characters is
the four limbs of tetrapods.
Birds, bats, mice, and crocodiles all have four limbs. Sharks and bony
fish do not. The ancestor of tetrapods evolved four limbs, and its descendents have inherited
that feature  so the presence of four limbs is a homology.

Not all characters are homologies. For example, birds and bats both have wings, while
mice and crocodiles do not. Does that mean that birds and bats are more closely related to
one another than to mice and crocodiles? No. When we examine bird wings and bat wings closely,
we see that there are some major differences.

Bat wings consist of flaps of skin stretched between the bones of the
fingers and arm. Bird wings consist of feathers extending all along the
arm. These structural dissimilarities suggest that bird wings and bat
wings were not inherited from a common ancestor with wings. This idea
is illustrated by the phylogeny below, which is based on a large
number of other characters.

Bird and bat wings are analogous  that is, they have separate evolutionary origins, but are superficially similar because they have both experienced natural selection that shaped them to play a key role in flight. Analogies are the result of convergent evolution.

Interestingly, though bird and bat wings are analogous as wings, as forelimbs
they are homologous. Birds and bats did not inherit wings from a common ancestor with wings, but they did
inherit forelimbs from a common ancestor with forelimbs.