What I want to understand is how it all works, including the following parts:
WSADATA wsaData;
SOCKET ConnectSocket = INVALID_SOCKET;
iResult = WSAStartup(MAKEWORD(2,2), &wsaData);
WSADATA is info, but what info is it specifically?
WSAStartup is a function to initiate WS2_32.dll. What is the differenece between initiating WS2_32.dll and SOCKET?