I am confused about the differences between a transposition and variation. I know that a transposition is when you start of with one opening and a set of moves after that leads to another opening and a variation is a deviation from the main line of an opening. They seem really close to me, so can a set of moves be a transposition and a variation? What/Who determines if a set of moves is a transposition or variation?
A transposition usually has to do with openings. Basically, it's all about move order, so while you might say that this is the modern defense (A40):
1. e4 g6 2. d4 Bg7 3. Nf3
If black follows with:
3. ... c5
It effectively transposes the opening into one of the Sicilian lines (B27):
1.e4 c5 2.Nf3 g6 3.d4 Bg7
Note that both positions are the same, only the move order changed.
A variation can be at any part of the game, and the notation is usually used while showing a "what if" scenario, to show why an alternative line is either better or worse than the main line of a finished game. Variations, in the context of openings, are alternative moves to the main line. Often, variations in openings have their own name appended onto the main opening name.
Continuing the line in the transposition above, a variation on B27 is the: Sicilian Defense/ Hyperaccelerated Pterodactyl/ Exchange Variation
1.e4 c5 2.Nf3 g6 3.d4 Bg7 4.dxc5 Qa5+ 5.Nc3 Bxc3+ 6.bxc3 Qxc3+
Update: I think I failed to answer the "title" question explicitly. Yes, a set of moves can be both a variation and a transposition. In fact, there are often many names for a given opening sequence, depending on the move order, some of which will be variations, and some will be transpositions.
While I don't disagree with the spirit of Wes' answer, I want to answer your question in a somewhat stronger way, one that I think goes further toward relieving any possible confusion about this issue. Your question is:
Can a set of moves be a transposition and a variation?
My answer would be that neither transpositions nor variations should be thought of as sets of moves, and that doing so in the first place is what creates confusion here.
While particular chess openings (e.g. the Sicilian Defense, the French Defense) are often thought of as consisting of a multitude of opening lines (sequences of moves), for the purpose of making the distinction that you're after it is most useful to think of an opening as a multitude of positions (which happen to be linked together by moves). If I show you the following diagram,
and ask you what opening we're in, you know that it's the Scotch Game, even though I only gave you the position and not the exact moves we used to get there. That's because the Scotch Game can be characterized by the positions that belong to it, whatever the move-orders involved might be.
Similarly, a variation can be seen as just a particular subset of positions from one opening, ones that we've decided to give their own special additional name. We recognize each of these positions,
as being part of the Sicilian Defense. Going into more detail, we say that the first one belongs to the Najdorf Variation, while the latter belongs to the Dragon Variation. Again, we didn't need to specify move-orders at all in order to make this classification, because a variation can be characterized by a set of positions rather than sequences of moves.
A nice thing about thinking of particular opening variations as sets of positions is that it is now clearer how transpositions differ from (and relate to) variations. A transposition is an event; namely, it is what happens when a move is made that takes us from a position that is labeled as being part of one opening/variation to a position that is labeled as being part of another. Simple as that. After the moves
1. e4 d5 we're in the earliest position that belongs to the Scandinavian Defense. If White continues
2. exd5 then we're in another position that still goes by that name. But if White plays
2. d4, a transposition has occurred, because this new position is part of the Blackmar-Diemer Gambit family instead of the Scandinavian family.
In sum, an opening/variation can be seen as a family of positions that are linked together by moves, and then a transposition is just when a move leads us out of one such family and into another.