People often knock on wood when they make a statement that seems to tempt fate. The idea is that knocking on wood will ward off evil spirits. Superstitions surrounding evil spirits are ancient, and the idea of touching wood to avoid them is also quite old. Many people in Northern Europe and North America knock so reflexively that they do not even realize that they are doing it, showing how ingrained the tradition is in these cultures.
In most cases, it is believed that one must literally knock on wood to deflect bad luck. People usually knock with a closed fist, creating a rapping noise like knocking on a door. In other cases, people may say “knock on wood” or “touch wood” after making a potentially risky statement such as “it doesn't look like rain today.”
The exact origins of the tradition are unclear. In many pagan traditions, fairies and other creatures were said to live in the trees. In these instances, people might knock wood to request good luck, or to distract spirits with evil intentions. This idea may have been adapted by Christians, as many early pagan beliefs were, and certainly some people associate knocking on wood with the cross. Pieces of wood or the true cross may be carried around for good luck by some people as well.
By the 1800s, many children's games included an exhortation to knock on wood, although the idea was probably widespread long before these games were popular. The tradition of knocking for luck seemed to become much more widely accepted as these children's games entered the popular imagination, however. By the 1900s, British and American people were both knocking on wood for good fortune.
People knock on wood in one of two contexts. In the first, someone makes a statement about something which they hope does not come true, and they knock to avoid that event. In the other instance, someone makes a statement about a desired outcome, and they perform the act either to pay homage to lucky spirits or to ward off bad ones, depending on personal belief. While knocking on wood is unlikely to have a scientific basis, it seems to be a relatively harmless superstition, and some people believe that it is better to be safe than sorry when it comes to luck.