How do they do it?
One person records and videos their part, then they send it to the other, who makes a video of their part, using headphones or an earpiece playing back the first contribution for synchronisation. Then somebody combines the two videos, using the sound tracks as a guide to synchronisation. Video editing software is readily available (some of it even free) for combining the two pictures side by side or in any pattern you like (basically you can resize and move each video component in the window by dragging with a mouse).
The same principle applies to the big multi part videos. You need to decide on one part that will make a good guide track for all the others. One I saw recently was a performance of Ravel's Bolero by Orchestre Nationale de France, a good choice as the side drum part is a constant non-stop two bar pattern all the way through, though there might have been a lot of counting involved for the other musicians!
When you've finished tweaking the sound balance and video positions and chopped extraneous start and end footage and maybe programmed in some cuts and dissolves, you let the software mix it all together to a single output video file, which involves a LOT of processing and can take much longer that the play time of the resultant video. For the big multi-part performances, you're probably looking at leaving the computer crunching it overnight and hoping it doesn't crash or overheat...