A variation can be any number of steps as long as each step would be legal if it were to be played. It is often as far ahead as a human or computer can calculate; or however long is necessary to reach a particular position of interest. It may also lead to a terminal state in the game, in which case the term "Winning Variation" or "Losing Variation" is sometimes used.
The principal variation refers to the particular variation that is the most advantageous to the current player, assuming each other player will respond with the move that best improves their own position. In other words, it is the "best" or "correct" line of play. In the context of tree-searching game AI --in which this term is most common-- it may also refer to the sequence of moves which is currently believed to be the most advantageous, but is not guaranteed due to the technical limitations of the algorithm.