This is a quick guide/tutorial to learning socket programming in python. Socket programming python is very similar to C.
Socket functions are documented at http://docs.python.org/library/socket.html
To summarise the basics, sockets are the fundamental “things” behind any kind of network communications done by your computer. For example when you type www.google.com in your web browser, it opens a socket and connects to google.com to fetch the page and show it to you. Same with any chat client like gtalk or skype. Any network communication goes through a socket.
http://www.binarytides.com/blog/python-socket-programming-tutorial/