mattedesa has explained it well. So the only thing to add I think is why you would want to use one or the other system:
If you have a staff with a starter that has a lot of IP (innings pitched, if you are new) and others that have fewer, or for any other reason you want to alternate pitcher 1, then pitcher 2A, pitcher 1, then pitcher 2 B, you select one to be 2A, or 3A or whatever, and the other to be 3B.
One example is when I was in a theme league using the 19th century pitchers with 700 IP - I had Kilroy pitch game 1, then 2A pitch game 2, Kilroy again in game 3, pitcher 2B in game 4. Essentially a 4-man rotation with three actual pitchers. So one time you might go with 2A/2B, or 4A/4B is when you have some starters with a lot more IP than others, but all with good IP/G averages (this is the average innings per game your pitcher pitched in real life - you see it when you click on their name and see their actual stats). If you have pitchers with good innings per game this can be a good system.There are other uses as well.
The tandem is often used instead when you have a two or more pitchers with low IP/G or also just medium IP - say you have three pitchers with 200 IP or more but you have two others that each have 150-170 and have around 5 IP/G. If you put those two in a tandem, based on their stats you set one to throw somewhere around 50-80 pitches and the other to throw some more and you have a starter made up of two people each going a few innings each time around the rotation.
So it depends on what is best using the staff you have drafted and find yourself with, or the strategy you want to pursue. I like the clean feel of 2A/2B, but in practice it is less common, I think, than tandems especially in progressive leagues, or in theme leagues that limit IP or consist only of players from one season, where IP are at a premium and to get through an entire start, to at least get 7 innings out of your starters, you put two guys together and when it works well, you have a start. You have to then ignore the fact that the W-L record will almost entirely be linked to the second of the two tandem starters.