It's almost like what happens in vlc when you skip too many times too quickly (well, in my vlc at least). I've had a look at a few tutorials but can't find something that looks as genuine as the one linked.
a quick way to do this in AE is to use a distortion map. Have your main footage in a comp, and add a video glitch that you can find on youtube or any other source. If the size is incorrect, scale accordingly, and then precomp. Then add an adjustment layer, and apply "distortion map" and set the map to be the glitched video layer. You can then adjust the level of distortion with the values in the effect, can keyframe it, or if you want to do an interspersed glitch effect, cut the adjustment map and put each cut where you want it. You could also adjust opacity with keyframes to change the strength of the effect. This method will glitch everything below the adjustment layer. If you want to just glitch 1 layer and not a background follow the same method with a duplicated subject, or put the distortion map effect on the main footage directly and keyframe the effect's values. Hope that helps.