Connect the black wire to the other brass screw. Black means hot white signifies neutral and green indicates ground.

Switches The Complete Guide To Wiring Black Amp Decker
Light switch with two black wires only. Notice the black wire is the only wire that we are controlling through the 2 way switch. 4 way switches have 4 screws 2 will be black and 2 will be brass. Or call in an electrician and have the circuit re run with 14 3 wire so theres a black white and red and then. You have an incoming hot wire black going to one screw it does not matter if you use the brass or silver screw on the side of the 2 way switch and a black wire from the other screw on the 2 way switch going to the load light ceiling fan etc. I have a switch with only two wires. Repeat these connections with the two white.
Its essential that you determine which black wire is hot before proceeding. Switches are never connected between a black wire and a neutral wire. You will have to get a 4 way switch for that position not a 3 way switch. Hooking up a switch is the essence of simplicity. If you have a ground wire connect the ground wire to the green screw. The two black wires one is power input the other is switched power output is used to control a light fixture or outlet.
You connect the black wires in the electrical box to the switch terminals and the white wires to each other. The smart switch wants a line and load. Connect the lead wires from the fixture to the black hot wire in the electrical box by twisting a wire connector to the ends of the lead and hot wires. If the switch that was there is a standard light switch with two brass screws on it and one green screw you can connect the red wire to either of the brass screws. Red and black form the same cable will connect ot he brass screws then the red and black from the other cable will connect ot he black screws. The switch also has a green terminal.
The easiest and safest way is to use a multimeter to test for current. My assumption is this switch is just breaking the circuit to the light so there is no way to have power here for the switch and have the light off. However if you need to rewire a light switch or a plug socket you may occasionally come across two black wires.