Unix Domain Sockets are a form of inter-process communication (IPC) that utilises socket files on disk, e.g. /var/run/docker.sock. They allow fast communication between processes without any network overhead. Sockets are extremely efficient when the system is under heavy load. The socket communication is contained in the kernel and all the components reside on the same computer - hence the name Unix Domain Sockets.
The socket files on disk are not actually for reading or writing commands - that would be too slow. The information is instead retained in kernel memory. The socket file’s primary purpose is to serve as a reference. Permissions can also be set on the files for access control.
Sockets only provide the hardware for moving data around. There are many different types of sockets which use different protocols, such as TCP and UDP, as well as higher-level protocols including HTTP, FTP and RDP.