You can create gem stones using the GEM_STONE item type. Gem stones are special items that you can drag & drop onto other items to give them extra stats. The item you're applying the gem on has to have at least one empty gem socket. Item restrictions (perms/class/level) apply on gem stone application just like a regular item.
Moreover, you can give item type restrictions to a gem so it can only be applied on a set number of items. This way, if you have, let's say, a gem that is supposed to give extra damage to weapons by sharpening the blade edge, you can make it so it can't be applied onto armors which would not make much sense because why the heck would you try to sharpen an armor.
Gem stones may also apply abilities onto your weapons [1.13 only]. Coming soon: potion & particle effects.
Applying a gem onto another item sometimes fail. If the gem isn't successfully applied, the gem stone will be lost and the item will receive no extra stat. The gem socket will not be used nevertheless.