First off, let's examine the term "CCD". This stands for "charge-coupled device". A CCD is a silicon chip with a surface that is divided into light-sensitive pixels. When light hits these pixels, tiny electric charges are generated. With enough of these pixels, you can get a fairly high resolution image. With adequate "sensitivity" (a term to be defined further down in this article), you can detect motion even in a dimply lit room.
Initially designed as a memory device, CCD became a good choice for image sensing because of its ultra sensitivity to light. Astronomers used the technology because it was as much as 100 times as sensitive as film and allowed previously invisible objects to be viewed.
Digital cameras can use CCD or CMOS (complementary metal–oxide–semiconductor) circuitry. However, CCD produces higher quality images. Thus, security cameras generally use CCD technology.
The difference between digital cameras and security cameras is in their basic way of working. Digital cameras store images when you tell them to. Security cameras only provide images (save and transmit them) when they detect motion. And motion detection is basically the process of comparing sequential images and determining whether the differences between them represent motion. If there are significant differences between two consecutive images, the cameras "conclude" that there has been motion within the camera view. They do this based on a couple important settings -- sensitivity and percentage.
Most, if not all, surveillance cameras will give you the option of selecting a particular area within the viewing screen to be monitored. In other words, you can say that you only want to detect motion in one area -- say the door or window.
There are two types of image changes that can occur. We can have an overall change in the pixels as we would if the lights in the room went on or off. If the room has windows through which incoming light will enter, you probably don't want to generate motion detection photos just because the sun is setting. So, you can select a "sensitivity" setting that provides a contrast setting and determines how much of a change should be reported.
You can also select how much of a change in your overall viewing area or within one or more sub-areas of interest represent motion.