A port is a logical connection method two end points communicate with. Ports operate at the Transport layer of the OSI. For example a VPN client connects to a VPN server over Port 1723. A socket is one end point of a connection. Sockets are a means of plugging the application layer in.