What are these male sockets called, and what are they used for?
Hex shank to square drive adapter
This bit is a hex shank to square drive adapter, which allows you to use square drive bits with a drill/driver.

Hex shank socket
The second set of tools is hard to tell for sure what it is. If the sliver bit at the bottom has a hexagonal cutout in it, then they are hex shank sockets. If that's what they are, they allow you to drive hex bolts/nuts using a drill/driver.
Square drive hex (allen) key
If the silver bit at the bottom of the second set of bits is square, then they are square drive hex (allen) keys. In this case, they allow you to drive hex/allen bolts using a square drive tool.

Hex shank sockets
These are defiantly hex shank sockets. They have a hexagonal shank, and a hexagonal hole at the other end. They allow you to drive nuts/bolts using a drill/driver.

Flexible (Jointed) sockets
These appear to be flexible (jointed) sockets. They should have a square hole at one end, and a hexagonal hole at the other. They allow you to drive nuts/bots with a square drive tool.