Sockets have a square hold into which handles can be fitted to drive the wrench - ie. ratchet wrench.
a wrench with a handle onto which sockets of different sizes can be fitted
This hand tool consists of a ratchet handle and a set of interchangeable sockets that fit over a nut or bolt head. Home Improvement Encyclopedia