How to achieve screen tearing effect or video glitches
This can be done in compositing with a displace node driven by a texture.

1st, let's see the basics.
In the node editor, select compositing and backdrop.

Now add a displace node (shift+A to open the menu or click "add")

link it to the image and to a viewer node (Ctrl+Shift+Click on the displace node) and you can move the image on X and/or Y with the X/Y scale values. Nothing really interesting yet.  

Now we want to control where this effect will affect the image. This can be done with a texture.  

In the properties panel, go to texture tab and click "new"

change the type to blend

and the blend to vertical

Now back in compositing, add an input/texture node and choose your blend texture

The outputs are Value and Color. Value is the alpha, color is...the color :)
Now plug the color output to displace's X Scale intput. You'll se a very small effect.
  

We now need to control the power of the effect.
Add a Converter/math node and change it to multiply. Connect the Texture-Color output to the 1st math input and the math output to Diplace-X Scale. Change the math value to 20 and you'll see something like that.

Some explainations :
The texture is black in the bottom, white in the top. Black means no effect, white means full effect (from 0 to 1). AFAIK, 1 is a 1 pixel displacement so the math node multiplies this by 20, what means 20 pixels.  

Now let's play with the texture.
go back to the properties panel in texture tab. In color, check Ramp.

also chage the interpolation to constant (allows TV line/pixel effect).

We won't use alpha, all we will change here is the BW value of the colors and add/move color stops (with the "+" above the ramp). Let's do something like this :

and see the effect

This is what we want : we can displace some parts of the image (controled by the texture) and change the power of the effect with the math node (0=no effect, can also be negative). The the value in the math node can be animated.  

This is the basic. We can do something more interesting.
1st, let's correct the hole created with the displace. 
Add a Color/mix node, click use alpha and plug the displace output to the 2nd color input of the mix node. The 1st color input can be any color you want, or a texture/image and will replace the holes alpha.
  

As this is a bit long and the basics are covered and (hopefully) understood, let's see how we can achieve the effect on RGB. We could use 3 different textures but we'll do this with 1, controling the displacement of each color.
Go back to the properties/texture tab. The texture will now use RGB values to control the image RGB displacement.

Add as many color stops as you want, change their R G B values. I'll use this :
  

Back in compositing, we need to separate RGB colors from the image AND the texture, use the texture's RGB to control displace of each image channel and combine them back. This is the complete node setup :

The math value can be changed/animated separately or you can plug an Input/value node to control them all.
You can also use 2 (or more) textures with separate displaces and animate a color mix node to control wich one is used.
You can use the texture's alpha to control another displace plugged to Y Scale.