Gems can be placed on any piece of armor that has a socket matching the shape of the gem. To add the gem to the socket, in your inventory, drag and drop the gem onto the piece of equipment you wish to upgrade. You will receive a confirmation window. Click to confirm, and your armor is now upgraded with the effect(s) of the gem.