The Totem of Holding is an item that spawns when you die. The totem serves to protect your items from other players, the environment, as well as prevent them from despawning. You do not need anything special to cause the totem to spawn. You can however only have 1 totem active at a time, spawning a new one by dying with items will cause your old one to despawn, dropping all it's items on the ground.
Totems will protect your items from other players for a varying amount of time (see Reputation), and from any environmental sources, such as lava or cactus, for as long as the totem is intact. You can only have one totem out at a time though, and dying will cause any existing totems to break, dropping all your items.
Totems you drop however will not have any protection time when you're raiding a land.
Note: Totem Camping, as long as they're not breaking some other rules, is completely allowed! (See rule 2.2 for relevant rules).
You can collect your items simply by walking over the totem. All your items will return to their original position in your inventory, unless that slot is taken at which point it will go to the fist available slot. If you do not have space for everything in your inventory, the extra items will be dropped on the ground.
When within 10 blocks of your totem, the totem will “gravitate” towards you, allowing you to collect it even with a wall in the way.