How do you wire a 3-way switch in the middle of a circuit?

Quote from the video:
Quote from Youtube video: We run that into the wire connector which would sit within the switch box for switch. 1.. We then connect from this wire connector. And run the white wire to a wire connector in switch box.

How do I know which wire is hot on a 3-way switch?

Quote from the video:
Quote from Youtube video: If no house current is found on any of the three wires. Go to the other switch. And do the same thing one of the wires will have house current and that wire is the hot wire mark.