Lion Traps are somewhat common hazards seen in the Tide Pool.
Standing two blocks tall, they repeatedly extend short spikes from the upper and lower sections when any creature is detected on either side of them.
A lion trap will detect any creature - be it the Spelunker or any other monster - within about 4 tiles distance horizontally of the trap, and begin stabbing the spears in that direction until the creature moves out of range. A successful hit deals 4 damage.
The spears have short range, extending just under one tile's length from the trap, but will extend and retract repeatedly with only a short delay of about 1.5 seconds between each stab.
The top and bottom sections of the trap operate independently, but can only extend spears in one direction at a time. Furthermore, the spears only cause damage when thrusting, and retracting spears will cause no damage when touched.
There is just enough time in each attack cycle to jump onto the trap and climb on top of it without being stabbed, but it's always safer to just destroy it or try to jump over it from higher ground.
A lion trap will often be found covering a door. As long as you don't get stabbed on the way towards the door, the spears won't hit you during the animation as you walk into the tunnel.
If you have a Shield, you can keep the lion trap from extending.
Note that if the top half is destroyed, the bottom section will continue to function normally.