It is a common-held fact of life that walking under a ladder would bring you misfortune. One supposed explanation for this superstition involves trying to compare a ladder with the gallows used in the Medieval era. It is commonly believed that if one were to walk underneath a ladder, it would ultimately lead to one's own death by hanging, and it was also believed that the ghosts of those executed on the gallows took possession of the triangle that was formed by the leaning ladder, thus making the ladder itself a haunted area. It's also believed that walking under a ladder is unlucky because, at that time, ladders were leaned against the gallows so that the executioner could climb up the gallows in order to get the corpses of the accused. If a person were to have walked under the ladder at that time, they were at risk of having a dead body fall on them, and it would either crush them to death, or it would greatly injure the individual from the impact.
Another belief regarding this superstition stems from the Ancient Egyptians. Egyptians believed that pyramids were powerful forces of nature, even something as simple as a ladder. If one were to walk under one, the sacred power of the pyramid would be broken.
There's also the belief that the ladder represented the Holy Trinity in Christian theology. According to legend, if one were to walk underneath a ladder in this version of the myth, it meant that that person has ultimately sinned against the Holy Spirit, and that said sin would never be forgiven.
There are many versions as to how you can undo your bad luck if you ever happened to walk underneath a ladder. One version of the myth entails that you go back through the ladder, while other versions say you wait at the spot until a dog walks by.