pixel data of color-images contain three (bytes of) intensity values denoted as R,G and B. Most common they are 8-bits but other formats are possible too.
Each intensity value at a pixel point represents the amount of light captured by a corresponding sensor at that point which is most sensitive to the given range of wavelengths (color); for example a RED value means that the associated RED sensor at that pixel captured that much of light in the wavelengths about $550$ nm to $750$ nm.
In a practical setting, the distinct wavelength captures can be realized by three different optical filters that separate the light spectrum into three regions associated with Red, Green and Blue. Then the incoming light (after being filtered) will be captured by three same type of sensors which are sensitive to the whole optical range (+ more possibly)