Do operating programs such as Microsoft Office or Windows Explorer use OpenGL to draw? I have a server and my only monitor is plugged into its graphics card.

My question is - do all programs (Windows explorer, Excel whatever) draw their output using the graphics card and more specifically an API such as OpenGL?

The output is coming from the graphics card so I do not see how it could not be but it seems like that would require anyone who is using a server to have a GPU to any visual output.
In general, no. Most applications, unless they are games, or 3D applications like CAD or animation software, will use OS APIs to do their drawing. On Windows, this can be things like GDI or GDI+. On macOS you would usually use CoreGraphics or one of its derivatives. 

At a lower level than the application level, the operating system talks to the graphics driver to tell  it to draw things on the screen. They may do so using OpenGL or a proprietary API that's not usually exposed directly to applications. (For example on older macOS versions, the Window Server used OpenGL directly to do its compositing. I believe it uses Metal now.) Additionally, some drawing may not be done by the graphics card at all, but the results may be sent to the graphics card for display. For example, the original Windows GDI did its drawing using the CPU, as hardware accelerated graphics were not included on every machine.

So really, there are a variety of ways for applications to do their drawing. They rarely use OpenGL, DirectX, etc. directly unless they have heavy graphics requirements. However, under the hood, the OS may be using those technologies or something similar, or something even lower-level.