Shackles are for enslaving players and Endermen. There are often rules stopping regular players from using them on servers.
If you use them on an Enderman, they become Ender Slaves. If you use them on a player, they use tools three times as slowly until they run out of durability, or until a gold key is used. This is crafted with a block of gold and three gold ingots. You use it by right-clicking.