People will go to great lengths to avoid walking under ladders. Many origins for the superstition have been surfaced over the years. One provides a source in medieval times. A leaning ladder was thought to resemble the gallows and so by walking underneath a ladder, you are playing out your own execution. Another explanation points to the triangular shape a ladder will take when erected or leaned up against a wall. The triangle is considered the symbol representing the Holy Trinity and to walk through a triangle violates and desecrates God while you, the perpetrator, fall prey to Satan.
If you walk under a ladder by accident, however, there are several measures that you can take to avoid bad luck:
Spit three times through the ladder's rungs
Cross you fingers until you see a dog
Spit on your shoe and continue walking, but don't look down at the shoe until the spittle has dried
Walk backwards, out from the ladder the same way you came in, and make a wish as you go back out.