The 3-pin type is properly called Addressable RGB (or ARGB or ADDR RGB or Digital RGB). Its wires supply power to the lights in its strip at 5 VDC, a common Ground plus a digital control line. Along the strip the LED's are grouped with little control chips. Each of these listens for an instruction packet and does what it is told with its little LED group. At any one moment, every group along the strip can be showing a different colour, so you can get fancy effects like rainbows that move.
The 4-pin type is just called RGB. Its wires supply power at 12 VDC and three Ground lines - one for each of the three LED colours. Along the strip, all the LED's of one colour are connected to the same Ground line, so they ALL must do exactly the same thing. Same for each of the two other LED colours. The mobo header manipulates the three Ground lines to change colours. So at any moment, the entire strip must all be ONE colour, although that can be changed.
So there are TWO important differences - the power supply voltage, and the method of controlling the light colours. So each type of light strip MUST be connected ONLY to a header or Controller that is designed for that light type. You can NOT mix lights of both types into one circuit.
Most people call the second type just plain RGB. and the first type ARGB. FYI, MSI uses on their mobo headers the labels JRGB for the second type, and JRAINBOW for the first type.
There's also a BIG potential for confusion. Because of the connector difference, many do use the terms "3-pin" and "4-pin" for these lighting systems. But exactly those terms ALSO are used to name two types of FANS - specifically the MOTORS of the two fan types: 3-pin older Voltage Controlled Fans, and 4-pin newer PWM Fans. IF you go to buy a FAN that includes LIGHTS in its frame, the motor and the lights normally will have separate cables to connect to the two different types of mobo headers. But there is NO relationship between which fan MOTOR and which LIGHTS you get in one lighted fan, so the NAMES used can get confusing!
3 pin design provides a 3 Wire RTD temperature sensor connection or can be used as a ground wire connection point to minimize potential electrical signal interference for thermocouples such as Type B