Generally speaking, any connection into which a plug can be inserted.
In computing, a socket is any exoansion slot into which an expansion card can be inserted.
In telecommunications, a socket is a standard for data communications by which a program can access the Transmission Control Protocol/Internet Protocol.