It's in the name, you make a box that detects if things hit it. In a nutshell, you would put your normal movement controls in the hitbox (like WASD). Then it would check if it was touching anything, like walls or enemies. If you want to make graphics for the character, you can set the ghost effect of the hitbox to 100 and make a new sprite follow the hitbox.