I have a light switch that is installed in a electrical box together with 2 other switches. I'm surprised that the switch has 2 hot wires. One wire is coming from the switch next to it, the other wire is the actual wire coming from the wall. All white wires of the three switches are joined inside the box. Is there a reason why the electrian would install two hot wires for the switch?
The wire from the other switch is almost certainly the line hot. If so, it will be always hot no matter what position either of the switches is in. This is electrically the same as having a separate wire going to each switch from a common line hot. I have a set of three switches in a 3-gang box wired that way.
The other wire also black should be the switched hot going to a light or a switched receptacle. It would be hot when the switch is on and not hot when the switch is off.