What's the proper way to replace a wall switch with two black wires?
The current switch is set up as having a hot wire in (from the breaker box to the switch) and a hot wire out (from the switch to the light). The neutral / White wires should be pig tailed together in the box. There is also a green screw on the side, and this is for the ground.

Make sure to shut off the power before doing this (turn the breaker for the circuit off). Connect the top screw to the wire that feeds to the light. Connect the bottom screw to the hot wire. When you turn the power back on, and if you want to swap the direction of the switch (as in press down to turn off, or turn on), turn off the power and switch the two black wires.