I had that issue when I was using an integrated graphics card. You can stop it happening by changing your Fast Preview options to adaptive resolution instead of using the OpenGL options. You can access these options by clicking on the small icon with a lightening bolt on at the bottom of the composition.
OpenGL is a language that accellerates certain graphics operations using your graphics card. There is a list of graphics cards that the After Effects OpenGL is fully compatible with on the Adobe website.
OpenGL is not vital and only works with certain effects. As I usually use other effects I tend to have my preview mode switched to adaptive resolution most of the time anyway. After Effects seems to be more stable in this mode.
This tutorial does a pretty good job of explaining the pros and cons of using OpenGL: https://library.creativecow.net/articles/mylenium/open_gl.php