Most often, trait similarities between different species are an indication of a common phylogeny (homology). However, the opposite is also possible: independent phylogenies can indeed show similarities due to convergence in evolution rather than relatedness. When this occurs, a phenomenon called "homoplasy", it becomes of interest understand what mechanisms determined the convergence in phenotype.
"Study of the underlying developmental genetic mechanisms may reveal whether the recurrent structure has evolved via a novel mechanism or whether the ancestral mechanism has been deployed repeatedly ."When similar traits are observed, a phylogenetic analysis can determine whether or not the similarities are due to homology or homoplasy: if the phylogenies are related, then the similarities have been inherited from shared ancestors. If, however, the genes are discordant, then the traits have emerged independently through homoplasy. This can happen at different levels, depending on whether it's through different mutations of the same gene, different genes, or different gene functions. These paths are not necessarily mutually exclusive, but they are hard to recognize.
Similar selection pressure on different species can cause homoplasy. As an example, in  Wake et al. mention two only distantly related species of lizards in White Sands, NM, that have independently evolved a blanched pigmentation. Other examples involve completely different genes that end up conferring the same phenotype. Petals in plants have evolved independently numerous times, and yet, despite the great variation they present in color, shape, and size, they always present conserved characteristics, in response to genetic and developmental constraints. In both vertebrates and invertebrates, eyes have gone through similar mechanisms:
"All eyes, invertebrate and vertebrate, develop through a cascade of similar transcription factors despite vast phylogenetic distances. These networks include genes (e.g., Pax6) that have been deployed in different ways at different times, and specific pathways that have re-evolved in different lineages by mutation, gene duplication, and intercalary evolution."
 Wake, D., Wake, M., & Specht, C. (2011). Homoplasy: From Detecting Pattern to Determining Process and Mechanism of Evolution Science, 331 (6020), 1032-1035 DOI: 10.1126/science.1188545