Socketing
From PWpedia
Weapons and armor may come with sockets, which can be imbued with gems. Imbuing a weapon/armor can bring great benefits to your character. Different Gems are empowered with different attributes. For example it can raise your physical attack, magical attack, physical defense, magic defense, accuracy, evasion, hp, etc.. Imbuing can also bring unique glow effects to your weapon/armor. To combine your gems to a higher level you can visit the Jewelcraftsman located in every town. (See: Jewel Crafting for making higher level gems to place in sockets.)
Gems can be bought, combined, dropped from monsters, rewarded from quests, or be found in some 'Lucky items'.
Each weapon can be equipped with up to 2 sockets and armor can be equipped with 4 sockets maximum. Sockets can be added using socket stones, a cash shop item, at the PW Boutique Agent. Higher level and legendary weapons or armor require more socket stones. See the image below for the amount of socket stones needed:

