A pupa or chrysalis.
It is called ballooning when a spider wraps its prey up.
butterfly
There are many insects that go through a stage where they live in a cocoon. This happens because they are usually changing from a worm like insect to a flying insect.
It is safe to leave the cocoon as it will survive. The cocoon is protection for the insect that is inside.
If you disturb a butterfly cocoon, it can kill the growing insect inside. It is important to leave the cocoon alone to let it develop naturally.
Cocoon for insect-appearance depend on type
A brightly colored insect resting on a leaf basically means that it is an insect pollinating insect. It may also mean that it is waiting to capture its prey.
moth
The correct spelling is "chrysalis" (insect pupa within a cocoon).
It takes between 5-14 days for a cocoon to hatch. If the cocoon has been around for longer than two weeks, the insect inside is probably no longer alive.
A chrysalis is a cocoon containing the pupal stage of a flying insect.
This is likely the word cocoon (an insect's woven metamorphosis wrap, chrysalis).