What type of tool is an "extension"?
The tool referred to is an accessory for a ratchet/socket wrench setup. It simply allows one to access fasteners that are inside deep holes.
It has a female square drive on one end--this connects to the ratchet; and a male square drive on the other end--this connects to the socket.
Extensions of various lengths

Ratchet with Extension and Socket in place