I want to switch out a dimmer switch with a regular switch. There are 5 black wires attached to this 2 wire dimmer switch - 1 to 1 and 4 to 1. How do I install a regular switch with two screws? 4 black wires to 1 and 1 black wire to the other?
If the dimmer controls only one light, the four wire bundle is almost certainly a group of hot leads powering several fixtures or outlets in addition to the dimmer and its fixture. The single wire from the dimmer goes to the fixture it controls.
You can confirm this by checking the leads using a non contact tester. Make sure the wires are not touching the box or anything else. Turn the dimmer off. Turn the breaker on. You should read power on the bundled wires and no power on the single wire.
Turn the breaker off again.
A pigtail (a short black wire) should be connected between the 4 wire bundle and one terminal of the switch (if is is a basic switch, either terminal will do). Connect the other terminal to the single wire. Mount the switch and turn the breaker back on.
The most common method (presumably the dimmer/switch is feeding at least 4 fixtures) is to wire-nut (or "wire nut alternative") the 4 wires and a short wire together, and connect the short wire to the switch (assuming it can only take 1 or 2 wires per terminal.) The wire nut needs to be the proper size for 5 wires (the 4 plus the jumper) of the gauge in use.