In the UPGRADE option of each item you can find the Socket option, as below:
To be able to place a Spirit on any gear item first you have to Drill the item. Below image shows Drill option:
Notes:
To create a Socket you need 1 Drill or 50 gems (fix price regardless of item type).
Inserting a spirit costs coins.
Removing a spirit costs gems.
Destroying a spirit is free of charge.