The CCD contains millions of capacitors. As light enters the camera through the lens, it strikes the CCD's photoactive layer, which causes each capacitor to accumulate an electric charge based on the amount of light that strikes it. The digital camera then converts the charge to pixels that make up the photo.
A CCD uses a slightly different technology from CMOS, another type of image sensor found in digital cameras. CMOS is the more popular technology.

