Use the arrow keys to move the square around. You cannot move it outside the black box.
Click on the square to change its color.
Click the Generate Opponent button to summon a white square.
Move your square into the white square to defeat it.