This is another superstitious expression. When we're saying something positive, and we don't want it to stop or in some way turn into something negative, we say "knock on wood." Then, we actually knock on wood. Sometimes, it can turn humorous when people use this expression and they have to find wood to knock on, and it takes them a few seconds to do so.
So for example, if you have a new English class that you're enjoying tremendously, and someone asks you how your new class is doing, you can say, "It's going great. I love it. Knock on wood." Then you look for some wood to knock on, and knock on it. This means that you don't want your English class, which is so enjoyable right now, to suddenly become horrible or boring.
Not everyone does this, of course. Those who do may do it because they're superstitious, or they may do it out of habit. Some people even do it to be funny. It's just an expression that you will definitely hear now and then.
A: I heard that you moved to a new place. How is it?
B: It's awesome. We really love it. Knock on wood. (knock, knock)
A: Where's it at?
B: It's in Park Slope, on Union St. between 7th and 8th Ave.
A: That's a nice area. You're also near the park, right?
B: Yeah. It's really great. I feel really safe walking home at night. Knock on wood. (knock, knock)
A: You know, I go to the library there sometimes on weekends. I'll give you a call next time; we can hang out.
B: Alright. I'm usually free on weekends. Knock on wood. (knock, knock) So just give me a call.
A: Alright. Talk to you later.
B: Ok. Later.
Of course, you don't have to be as superstitious as B, but you get the idea.
superstitious - believing in something supernatural (beyond what is natural and easy to understand)
humorous - funny
tremendously - a lot; in a big way
now and then - sometimes
Alright folks, enjoy your day.