In Diablo 3 for the PC, unsocketing gems from a socketed item will cost you money, so you always want to be sure that’s what you want to do before you go ahead with it.
If you want to remove a gem from a socketed item, you need to head to Shen the Jeweler in town.
Shen’s second tab on the right is the tab for removing gems from their sockets. Drag an item with a gem in it over to the holder on this tab, and it will give you a price to remove the gem (or gems). The higher quality of the gem, the more expensive it is to remove it from the socket.
Once you have removed it, the gem goes back to your inventory, and your socketed item is ready for a new gem.
There is also a trick to remove your gems for free if you don’t care about the item they’re in that much.