The other has 4 wires. Usually though you see a red wire only when the outlet is a 240 volt one or when its controlled by a switch.
3 Way Switch Wiring Electrical 101
Red white black wires outlet. If you only have black wires in your box connect both the non white wires from the fan to the black wires in the box. To avoid confusion on determining your white wires function mark the wires end with red or black electrical tape. The black wire hot wire coming in from the left is the source power. White wires are always neutral in 110 volt circuits but can be used as the second hot wire or switch leg in 240 volt applications and three way switches respectively. We are just makinga style change. In most cases a red wire present in an electrical outlet means that a switch can operate the outlet.
Now coming out of the fan are 3 wires and the green ground. There is a green ground wire on the ceiling fan mount plate. Black white and bare. Red wires are also hot wires. The black wire goes to the bundle of black wires. That color is mandated by the national electrical code.
The wires are black blackwhite and white. A live black wire a green or copper ground wire and a neutral white wire. Some countries have their own standard color codes too. Attach the black wire to the outlet you want to always be on usually the top one and the red wire to the switched outlet. Black white red and bare. For jurisdictions without standard rules for wire colors local custom and common practices of electrical inspectors are usually followed.
Connect the white wire to either of the chrome screws remember they are still joined and the ground wire to the green ground screw. Then the red wire in your box goes to the non white wire on your ceiling fan which is often blue. By convention the other is usually black but it could be red. Generally electrical socket boxes come with three wires each of them colored differently. The red wire switched hot wire going to the outlet wires into the other side of the switch and the white wires neutral tie together to complete the return side of the circuit. A red wire in an electrical outlet often indicates a second positive live wire.
As hot wires can be connected to each other a black wire can be connected to a red wire. It is tied together with a wire going to the switch and the black wire going to the outlet. One of the conducting wires the neutral is white. When wiring a panel or installing breakers identify wire color to insure that when you are sharing the neutral the black is on phase 1 and red wire on phase 2. The white wires on the fan go to the bundle of white wires. In the ceiling are 2 sets wires one has 3 wires.