What is the difference between pin and socket?

Contacts for connectors are called PIN or SOCKET.  It defines the gender of contact.

Pin / Male Contacts  

Socket / Female Contacts