Question: I've programmed a couple simple games so far, in C++ as that's my language of choice, all using open source, cross platform libraries, they're great. I'd like to understand how are cross platform libraries written, this is why i want to write a game for windows only without using a library that provides an abstract layer for the technical side of things like input. However i have some general questions.

First of all, is the windows.h library still used (there's so many new technologies and libraries comming in, i can't tell which are outdated since i'm new to this) for the low level communication between a C++ application and Windows? This means handling input, multithreading, etc. Similarly, is winsock.h still the library for network programming under Windows? I know it's very old, though so are OS standards, i'm confused. Are all the libraries that handle networking just wrappers that use winsock.h? Are these libraries maintained by Microsoft, do i need to manualy update them, do they come with the compiler or the OS.

Do cross platform libraries like SFML or Qt use windows.h or do they go lower than that? I know you can get input straight from reading interrupts, but how do you handle f.e. multithreading.

Do Unix systems also provide a library for interfacting with the OS? Does this include things like sockets? Are these libraries used in cross platform libraries?

All of the libraries, no matter the OS, were written first, so there is a way to get to the OS directly without using them, but are low level "tricks" like these used, or do people just use the API provided by the OS for cross platform libraries and then compile apropriate parts of the code depending on the target platform.

Answer: 
all your questions have same short answer, "YES".

windows.h is still used. also people still use "winsock.h", but there is "winsock2.h" which has provide same API as the "Berkeley sockets" (the one used in linux/unix/etc.) so the later is more common. 

in windows working with devices is very restricted, it's either using windows API or using DirectX API. Infact DirectX was introduced to let people use devices directly. so all the libraries should use one of those two. on linux however things are a little bit different. there is a direct access to every device. But all devices usually have some libraries to handle them. for example almost everyone uses OpenAL for audio management.
Your question is so complicated, but I'll try to answer for some of sub-questions.

Yes, windows.h is still used in cross platform librares. E.g. [SMFL](http://www.sfml-dev.org/forum/viewtopic.php?p=37521&sid=50e612976a419cba20304b8cb4ece8da):

> 
> [...]You can't use OpenGL on Windows without windows.h included
>  first[...]
> 
> 
> 

Unix-like system often get more low-level libraries than Windows. Just look at Linux where you can edit kernel.

If you want to dive into some cross-platform programming just download some open-sourced library and read it's source. You can start with SMFL.