It is a mechanical part that provides mechanical and electrical connections between CPU and motherboard thus CPU can be replaced without damage. Motherboards are categorized by socket.
Common sockets utilize retention clips that are designed to apply a constant force, which must be overcome when a device is inserted. For chips that sport a high number of pin-outs, either zero-insertion force (ZIF) sockets (used in older CPU) or land grid array (LGA) sockets are used instead. These designs apply a compression force once either a handle (for ZIF type) or a surface plate (LGA type) is put into place. This provides superior mechanical retention while avoiding the added risk of bending pins when inserting the chip into the socket.