Win32 isn't an API, is a nickname for 32-bit versions of Windows. Maybe you're talking about the Windows API. In which case, it's part of the OS.
The software part of OpenGL works by sending commands to the hardware through its drivers. Most of the work is done by the hardware.
Some OpenGL implementations provide software rendering, in which case the CPU does all the work of managing the finite state machine, rendering primitives, and so on. Unless I'm mistaken about their workings, they only output to temporary buffers and it's up to the programmer to decide where to send the rendered picture. It could be a file, it could be a window, or something entirely different altogether.
Does that answer your question? Or did you want to know something more specific, such as how are graphics displayed on the screen?
It is worth pointing out that, for years, the Windows API was called Win32, and many people still use the name. Even the documentation still refers to it occasionally as Win32. For instance:
For what it's worth, I have seen people referring to Win32 API simply as "Win32"; as an example, wikipedia redirects "Win32" to "Windows API", rather than "Windows" or "32-bit Windows".
Thanks for the replies but yeah i'm wondering more how you accutaly display the windows on the screen.
The system writes pixels to video memory and the hardware sends signals to the monitor.
That's for strictly 2D windowing systems. If there's compositing going on, it's much more complex. The system writes pixels to textures stored in hardware and different commands are sent to the hardware to produce different effects. For example, the "wobbly windows" effect that can be seen in Compiz is achieved by splitting the windows into a mesh the size of the window and transforming the polygons in it to give the appearance that the window is bending.
Guys I don't want to sound like a tube but I am a newbie and I'm wondering how do you write the low level stuff is it assembly or c++ and if you know a good tutorial could you please point me to it cheers
It's possible for a program to write directly to video memory by interfacing with the display drivers, but that hasn't been done in decades for a very important reason: modern hardware is very heterogeneous. If you write something like that and get it to work properly, it will work for your hardware configuration, and your hardware configuration only.
That's why abstraction layers such as DirectX, OpenGL, and even [I can't remember the name, right now. It's that Windows API that lets programs write to windows as though they were bitmaps.] exist. To support as much hardware as possible while changing as little code as possible.
To repeat RedX's question, what are you trying to do?
I'm seconding helios' post, but I would like to point out that very low level code (drivers, OS kernels, those sorts of things) can be written using one of many Assembly languages and/or C, though C is the easier to use language. Any true Assembly language (HLA doesn't count) has a pretty sharp learning curve relative to C.
Okay... what you want then is a GUI/Application Development library, like QT4. If you want to create a GUI library from scratch, good luck, and you'll need to study some OpenGL.