They should both be of the same wire gauge. This type of switch lets you turn the light off or on from more than one place in the room.

Breaker Trips When I Turn The Light On How To Troubleshoot
Wiring a light switch with red white and black. Black white and bare. The most common home wiring uses non metallic sheathed cable with three wires in it. The wiring in the ceiling contains a black red and white wire as well as a ground. Red wire power or hot wire black wire power or hot wire white wire neutral bare copper ground. Twist the two copper wires in the first box together and attach them to the ground nut on the switch. Some sheathed cable includes a fourth red wire which makes it useful for wiring.
When wiring a 3 way switch circuit all we want to do is to control the black wire hot wire to turn on and off the load from 2 different locations. 12 awg for 20 amp circuits and 14 awg for 10 and 15 amp circuits. A three way switch is different. If it doesnt work switch the lower wires. I am trying to replace a ceiling light fixture. This is a typical wiring setup for a 3 way light switch with black white red and ground wires.
The switch it is connected to is a dimmer switch with an onoff button as well as a dimmer slider. Youll have two cables in the switch box a live one with a black and white wire and the one going to the outlet which has a red black and white wire. Going out of both boxes and into your light fixture will be 143 wire which has a black wire hot a white wire neutral a red wire traveler and a bare copper wire ground. The fixture contains only black and white. This type of switch has two brass screws usually. Wiring a three way switch.
The red wire in the ceiling fan or light fixture wiring electrical question. Black wire power or hot wire white wire neutral bare copper ground.