Digital cameras work with the same basic concept as a traditional camera. They have a viewfinder or LCD screen to show the image prior to taking a photograph, a lens with a shudder behind it to allow the light from the subject to hit a light sensative material. However, this is where most of the similarities end.
Digital cameras use a CCD (Charged Coupled Device) to sense the colors of the light and their intensity. The CCD can be likened to a very find piece of graphing paper, with thousands of little squares (transistors) to which sense the differences between the colors. There are three types of transistors used in commonplace CCDs, red, green and blue. Each transistor then passes the color and intensity it sensed to and Analog-to-digital converter (ADC). The ADC then converts the information passed to it by the transistors into a digital format, or binary 1's and 0's. The digital output of the ADC is then passed to a Digital Signal Processor (DSP). The DSP adjusts the contrast and other image details to get the perfect look and then compresses the data into a file format like JPEG (Joint Photographics Expert Group).
Digital cameras may also have the ability to do an optical or a digital zoom on an image. An optical zoom is when a lens is used to get a closer look at the subject. A digital zoom is used to enhance the optical zoom for a larger image even though the maximum size has been attained via optical zoom. Even though an image can be resized later, it is suggested to use the built in digital zoom of the camera at this point before any compression has been done to the image. File formats like JPEG tend to degrade in quality when resized more so then when the image is resized by the camera's software. This is due to artifacts left behind due to the compression.
A good resource for definitions of the terms used above is Digital Photography Review. Please refer there for more information. Kodak also has a good site with much information on how things work, Kodak Digital Learning Center.
Awaiting permission from Kodak to use their technical specifications from the Kodak web site for this information. It is copywritten.