Red goes to black or black to red because those are your hot wires. This color of wire is used to transfer power to switches and outlets in all types of circuits.
Electrical Wiring Color Coding System Dignity Cables
Red and black wire means. Negative the wire for the negative current is black. Black wires are never used as ground or neutral wires and must always be treated with caution. White wires augmented with red or black tape or markings are used as hot. In most cases you see a red wire in an outlet box only in special circumstances. Remember black and red wires are always hot meaning they are source wires that carry power from the electric service panel to a destination such as an outlet or a light. Red or orange wires are often used to provide the secondary phase voltage in a 220 volt application.
Black wires are used to provide power in the circuit. In standard 120 volt wiring the hot wire is black but it can also be red. The red or striped wire is the hot wire for the lighting fixture of the ceiling fan so if your ceiling fan does not have a lighting fixture it will only have the three other wires mentioned in the following sections. Moreover sometimes this wire can come directly from the main circuit breaker in order to always be on. The white wire is the neutral and all other colors are hot. White and grey wires are your neutral wires and those should never be connected to brown which is a hot wire.
However a black wire can never be used as a neutral or ground wire or for any purpose other than to carry a live electrical load. Positive the wire for the positive current is red. When wiring for dc power there are typically going to be either two or three wires. Another is that the box is on a circuit three way switch loop. They may use other colors for. Always assume black wires are live.
The colors regulated by the national electrical code in the united states are standardized for safety. Red wires are also hot wires. Also black wires are often used as switch legs in circuits which is the connection linking a switch to the electrical load. The coloring is as follows. Consider all black wires to be live at all times. One is that the outlet is a 240 volt one which requires an extra hot wire.
Although a white wire should only ever be connected to another white or grey wire. In 220 volt circuits red wires are the secondary live wires. Electricians often use black red or blue wires to deliver electricity to a circuit from the main panel. Black wires are always hot wires meaning that they carry electricity.