In digital camera, there is a sensor array behind the lens that capture the digital image. The sensor is called CCD which is charge coupled device. It composed of an array of small sensor, each one is one pixel. It is arranged in rows and column. Each contain a photo diode sensor that capture the color and brightness and translate to a charge and store in the cap inside each pixel cell. After capture the image and store in each of the cap inside each pixel, the circuit in camera then transfer the charge of each pixel into memory. This can then be display on the screen or put it on picture. So:
1) Pixel is the smallest element of the image sensor.
2) Each pixel contain a color photo sensor that put charge into the cap of each pixel.
3) Each pixel have a cap inside to be charge by the photo sensor and store the amount of charge proportion to the color and intensity.
4) circuit in camera then shift the charge amount out of the CCD device and store in memory that form the picture.