There are billions of winsock tutorials out there... my advice is to search for +win32 +"winsock tutorial" on google. When I designed a simple chat program I did it by barely modifying a skeleton client/server example that was already out there. (No, this was not a school project... nobody gets to flame me for that!)
There are a lot of client/server examples out there so just pick one that you understand well and modify it to your uses. If you want to get really fancy you could try redirecting the output/input of a command shell to the socket, telnet style. Otherwise you could find sourcecode for an existing telnet daemon and modify that.
--------
It is an honor to recieve an honest reply. (Prov 24:26)