SOCKS (socket secure) is a protocol for proxy. A socket is an endpoint of communication. How are they related? Thanks!
To connect to a SOCKS server you need a socket. And instead of connecting your local socket to the target endpoint (source:ip) you connect it to the SOCKS server and use the SOCKS protocol to tell the SOCKS server what your final target is (by ip:port or hostname:port). The SOCKS server then creates the connection to the final target and relays all data between you and the target.