A socket is identified using the IP address of the network node, and the port number within the network node.
If a network node wants to send UDP data onto the network it first creates a socket, then sends the data to that socket. If a network node wants to receive UDP data it first creates a socket on an address that is known by the node that will send the data, then reads the data from that socket.
If a network node wants to send TCP data onto the network it first creates a socket, connects that socket to a socket on a remote node, then sends the data to that socket. If a network node wants to receive TCP data is first creates a socket, then listens on that socket for incoming connections. When a connection is received it may (optionally) create a new socket to handle the connection and then receive the data on the new socket - leaving the original socket listening for additional incoming connections.
It can be seen then that any one network node can be involved in multiple network conversations simultaneously - with a socket being used at each end of each unique conversation.
Sockets can also be used to send and receive broadcast and multicast communications - which are both a form of one to many communications.
The API function FreeRTOS_socket() is used to create a socket.
The FreeRTOS+TCP networking tutorial demonstrates how to use sockets.