One pin will be a "common cathode" or a "common anode" (and the packaging should tell you that).
Three other pins are for Red, Green and Blue. You will need three resistors, e.g., 220 ohm or thereabouts.
My photo shows a typical "common anode" package type, but the same idea works for "common cathode" types. It's just a matter of what you write to the output pins, and where the common wire goes, +V or GND.
