In software you need a way to talk to hardware. That's called an interface. OpenGL is an interface to 3d graphics hardware.
A Game Engine includes, among other things, a graphics engine. The graphics engine needs to talk to the 3d graphics hardware (aka graphics card), and can use OpenGL to do that.
OpenGL is an interface and like most interfaces it can be used from several languages, altough C++ is one of the more popular languages for using OpenGL.
OpenGL, being an interface, doesn't "do" animation. Interfaces allow one side to talk with the other. As such you can write software that uses OpenGL to tell the 3d graphics hardware to display something that looks like an animation.