Can You please give me some clear idea about Socket / Port / IP address and how they are working each other in a Client Server Program?
An IP address is the address of a computer on a network.
A port is a number between 1 and 65535.
A socket is one half a channel of communication between two computers over a network on a particular port. (the other half is the corresponding socket on the other computer)
A process can open a socket to a particular IP address on a specific port.
A process can also open a socket to receive connections from anyone on a specific port.
For more information, read Wikipedia
This is slightly too complicated to post as an answer.
Here is a tutorial on TCP/IP socket programming. A PDF of the slides is available which give an introduction and sample code. I guess this could get you started.
Also check out tutorials on your language of choice to see the specifics of the function calls in that environment. It is basically all the same as the same principles apply, but the function calls and levels of abstraction may differ significantly.