At the lowest level, pyglet uses OpenGL to draw in windows. The OpenGL interface is exposed via the pyglet.gl module (see The OpenGL interface).
However, using the OpenGL interface directly for drawing graphics is difficult and inefficient. The pyglet.graphics module provides a simpler means for drawing graphics that uses vertex arrays and vertex buffer objects internally to deliver better performance.