Meanings
to tap one's knuckles on an object such as a desk or wall to attract attention or as a signal of commmunication.
Example: "Just rap your knuckles on the wall when you're ready to go."
to give someone a punishment.
Example: "If the sales department doesn't get organized soon, the CEO is going to rap their knuckles."
to strike someone on the back of the hand with an object such as a stick or ruler as a method of punishment.
Example: "In the old days the teacher would rap someone's knuckles with a ruler if they misbehaved in class."