Cocoons are items you can carry that will protect your stuff for a while if you die. Normally, when you die, your stuff will stay on your corpse. With a cocoon, it will instead be locked inside an indestructible bubble for a limited time that only you can open.
The only requirement for using a cocoon is carrying it in your inventory; you don't need to manually activate it or anything, and it will kick in as soon as you die. The cocoon will last one real-life hour before disintegrating. If you do die with a cocoon in your pocket, reclone and hightail it back to the cocoon. Once you reach it, to get your safely preserved stuff back.
Note that if some dangerous mob happens to immediately kill you again after you open the cocoon, you're out of luck. For this reason, some players like to carry multiple cocoons.
Cocoons are available from Eschaton Outfitters, EO on your map in Freedom City, conveniently located one west and two south from Clone Arrangers. You can get cocoons from the automat outside if the shop is closed.
In theory, you canto allow your corpmates to open your cocoon for you. In practice, this is very buggy and will probably outright do nothing. You have to be the one to open your cocoon.
Cocoons and XP
The higher your total XP, the less effective a cocoon will be. At low XP, all your stuff will be preserved. After 7,500 XP, fewer items will be covered. Later in the game, only one or two items will be preserved - or none at all. Crafted blue cocoons have a higher threshold, tapering off at 20,000 XP. They also last three real-life hours instead of one. Red cocoons used to be even better, but were removed from the game.
Because of the problems with Skydock, dies on a boss tile, and forces your whole party to back up your dumb clone in getting their crap back from that specific tile, your friends will be pissed., players who have reached the midgame (i.e. past 100,000 XP) are often discouraged from carrying cocoons. If you are that guy who brings a cocoon to
Black cocoons are (rarely) crafted cocoons which do not preserve your gear. Instead, they explode when you die, as a way of getting back at whoever killed you. The explosion may destroy gear which is destructible, and the power of the bang scales with the net worth of your stuff. The explosion will also trigger any other bombs you happen to be carrying.
Needless to say, these are useless to Carebears, and are rarely used by PvP players due to the inconvenience of the crafting recipe, the potential for expensive accidents, and people's hopes of recovering their stuff instead of blowing it up.