Neighbour joining is a method that infers relationships between witnesses (or organisms if using biological sequence data) by sequentially grouping those that show fewest differences. It uses a distance matrix as input.
Illustration
Fig. 1: An example how neighbour joining works from Wikipedia user Tomfy.