Skeletons are a somewhat uncommon enemy in Spelunky that may be found in all areas.
They pop up from certain seemingly innocuous piles of bones that are occasionally seen around the dungeon. While they're not very dangerous foes, they can still score cheap hits if you get fail to take caution around suspicious skulls.
Undead Skeletons spawn as dormant piles of bones on the ground, attempting to disguise as one of the harmless bone piles that are sometimes seen on the ground. When the Spelunker runs over them or attempts to pick up the skull, they will assemble into Skeletons and walk towards them, dealing damage as they do so. A reanimated Skeleton will walk off ledges and only turn around if it runs into a wall.
A good method for checking whether a pile of bones is an undead Skeleton lying in wait is to whip them - skulls that are part of a skeleton will be destroyed, regular ones will not.
Suspicious piles of bones may also be identified from a distance. Undead Skeletons waiting to ambush you will always be arranged with a large white bone visible to the right of the skull (See attached image), so skeletons that don't show this bone are always safe to touch.
However, not all skeletons with a visible white bone are the undead enemies. Even suspicious bones may sometimes turn out to be safe.
Bone piles which can't be destroyed when shot at (for example with the shotgun) always reveal a skeleton. Be careful; skeletons are invincible when re-assembling, but may still hurt you.
Active skeletons are easily dispatched with the whip, or by jumping on them. When destroyed, they drop a skull which usually shatters when it hits the ground.