When the golden idol is lifted, there will be a short rumbling before a 2x2 tile wide boulder crashes through the wall carving and drops down onto the platform where the idol was placed, immediately rolling in the direction of the Spelunker, smashing through any obstructions in its path.
When the boulder hits a wall at the edge of the map, it will rebound and start rolling in the other direction until it runs out of momentum. Boulders lose momentum faster when they have to smash through blocks.
When a boulder stops, it simply comes to a rest and may block passages, but can be climbed over or destroyed with a bomb, usually dropping rocks as debris.
If the Spelunker gets crushed by the boulder, he will be killed instantly.
There are several good strategies for surviving a boulder trap and getting away with the idol.
Boulders are two tiles tall and do not climb slopes. To avoid them, seek higher ground at least three tiles higher than the platform the idol was placed on. You can use a rope if necessary.
If you're standing on a platform only two blocks high, it's not too difficult to jump over the boulder as it approaches, either - but be careful if it comes back.
Alternatively, if you drop down a hole a single block wide, the boulder will roll right over you. You can also descend far enough that the boulder will lose momentum before it smashes through enough rock to reach you.
You can also simply run away after taking the idol, hoping that you'll get far enough so that the idol platform moves into the Frozen Region before the boulder spawns. When you move back to the platform, you'll probably be on a lower level and the boulder will be harmless. Remember however that the boulder itself cannot get frozen once it has spawned, so moving away from a rolling boulder won't stop it.
It's also possible, albeit very risky, to jump over the boulder from ground level with Spring Shoes. If the boulder is slow enough, one can jump over the boulder without the spring shoes, but this requires extraordinary precision.
Disarming the trap
The boulder trap can be disarmed by placing a bomb on the idol platform. When both blocks are destroyed, the boulder will not trigger when you pick up the idol. You can also dupe the counterweight mechanism by pushing a push block onto the platform and pushing the Idol off the trigger plate with it.
It's also important to consider that the boulder will kill any Damsels or Shopkeepers that it finds on the way, so you may consider skipping an idol if there's a risk the boulder could roll into a shop, as the Shopkeeper's death will be blamed on you and your life expectancy will plummet.
It may also destroy altars, netting you the -8 favor from Kali and the subsequent punishment.
It's usually quite profitable to follow a boulder path of destruction once it's no longer dangerous, picking up any loose treasure that was freed as the boulder smashed through the level.
The rolling boulder trap is an obvious nod to the iconic boulder scene in Raiders of the Lost Ark.