"Shadow-boxing" is simply the act of striking/stabbing/slicing an empty square with your character in an attempt to gain free skill points (up to 45) for Melee, Knives, Blades or Spears without risking durability. The term first came up on the official game forums.
Since it can cost quite a bit of food, it's an advanced trick mostly used on higher difficulties with the Scout or Engineer. To attack an empty square, hold down the CTRL key and LEFT CLICK anywhere within range. It goes without saying that you can do the same with ranged weapons, but the ammo trade-off is most likely not worth it.
The method used is identical to the one you would use to attack an invisible creature.