It's just a load of masks and layers. You use the initial "nonmoving" shot as the base, then image by image you add in a layer from the successive "capturing movement" shots until you have a whole series of pictures that are just the little bit different in that one area. Then stack as an animated GIF.