A Manastone is an item that adds an ability to the item it is socketed into. If an item can be socketed, there are squares at the bottom of the item tooltip, indicating how many manastones can be added.
To socket a manastone, open the Profile Window (P). Double-click or right-click the desired stone from the inventory below, and select the item to be socketed.
If a manastone fails to socket, all the manstones in the item will be destroyed. This is perhaps the most frustrating part of socketing.