To knock on wood means to tap on wood to prevent bad luck. This is actually a superstitious reaction to prevent something bad happening; it is similar to saying "Touch wood!"
1. Before starting out on the late night journey across town, Dimple knocked on wood.
2. The businessman knocked on wood before laying the first foundation brick of his new office premises.
3. Kartik never completely trusted his astrologer, so always knocked on wood before heading to the first day of a film shoot.