Use "WASD" to move around
Use "the mouse" to look around horizontally around the player
Use the "Space" button or "Left Click" to swing your axe
Time your swings with the bar to successfully swing your hammer.

The Lumberjack will swing the axe on the side the axe is on (A will look left, D will look right).