I am trying to replace a dimmer switch with a standard on off switch. The current dimmer has 2 black wires connected to it but no ground. Do I just unscrew the black wires, remove dimmer, and attach the same black wires back to the new switch?
Yes, but if there is a ground wire in the box, you should attach it to the ground screw on the switch.
If there is no ground wire, but the box is metal, you should connect a ground wire from the switch to a screw put into one of the threaded holes in the back of the box, or use a ground clip placed on the edge of the box.
If there is no ground wire and the box is plastic, you can ignore it.