Here’s how to properly wire a three way switch:
There will be two three-way switches in this setup. For example one at each end of a hallway.
On the first switch:
You will connect the black wire from the breaker panel to the brass screw that is by iteself on one side. Between the two switches there should be both a red and a black wire. The red wire will connect to the odd color screw (typically black or another very dark color). The black wire will connect to the brass screw that is on the same side of the switch. In a properly grounded circuit there should also be a bare copper wire which is the ground and should be connected to the green screw. There will be multiple bare wires in the box which should all be connected together in addition to being connected to the green screw. The white wires in the box should all be tied together but they should NOT be connected to the switch in anyway.
In the other switch box you should again have the red and black wires running between the switches. The black will connect to the brass and the red to the odd color screw. You will again connect all of the bare copper wires together inside the box and connect them to the green screw on the switch. The white wires in the box will all connect together but will NOT connect to the switch. There should be a black wire that feeds to your light and it should connect to the brass screw that is by itself on the switch.