To join a unit a character must move into base contact with it during the Movement phase. Once a character has joined a unit in this way, neither character nor unit can move further, so it's a good idea to plan your moves in the correct order.
As a unit can move only before the character joins, it's better to move the unit first and then have the character move to join it. a unit which has been joined by a character in the Movement phase only counts as having moved if it has itself moved, not if a character has moved to join it.