Both technologies serve the same purpose: to sample and record how much light hit each pixel. They just work differently to achieve that goal. The pixels on a CCD contain no active circuitry, just a small "capacitive bin" which passively stores a charge until it can be shifted along to the next bin, and eventually off the sensor and digitized by circuitry then. A CMOS sensor is basically a sensor constructed like a big integrated circuit, and it includes a small active circuit including transistors within every pixel so each pixel is capable of actively measuring and maintaining the charge hitting it, rather than just passively holding the charge until it is shifted off for reading.
Both have strengths and weaknesses - some of the top ones involve video mode (or live view mode).
In live view or video mode, CCD sensors exhibit vertical streaking, where bright points of light in the frame, even at the edge, can create a vertical bright line from the top to the bottom of the frame. This is caused by current from a single pixel "overflowing" and leaking throughout the whole row. Note that professional video cameras which use CCD sensors (and cost thousands of dollars) have circuitry to minimise this. Also, when used for stills ie not in live view/video mode, CCDs operate in a different mode which isn't susceptible to vertical streaking.
CMOS sensors don't exhibit streaking at all, as each pixel has its own circuitry isolated from other pixels.
CMOS sensors exhibit a rolling shutter effect in live view or video mode, or any time they are not using a physical, mechanical shutter. Instead of capturing the entire frame at once, information is read from each row of the frame one after the other. The time this takes varies between cameras, but 1/30s or 1/60s would be typical durations for a full sensor readout (at full resolution). This creates a jelly-like wobbling effect in recorded video when the camera is handheld or moves a lot, or even in stills, when using electronic shutter (for fully silent operation).
CMOS sensors specifically designed to allow high frame rate video capture (such as 120fps or more) will exhibit less rolling shutter effect. Additionally, running a sensor at lower than full resolution (eg recording 1080p on a sensor instead of 4K) can switch the sensor to a faster readout mode and therefore have less rolling shutter effect.
CCD does not suffer from the rolling shutter effect.
- Noise / quality in general
While there used to be a quality trade-off in CMOS, this is negligible now and may even have reversed. Certainly for large sensors (DX, 4/3, FF) there is no practical difference apart from just individual differences due to the design of the sensor. CMOS technology is moving quickly and image quality has been improving, especially with small sensors such as those used in smartphones.
For very small sensors such as in compact cameras and smartphones, CMOS sensors used to have poorer sensitivity, a result of making the pixels so small relative to the size of the circuitry on them. However, improvements to fabrication processes, and a new technology called "Back Side Illumination" (BSI) have countered this.
Professional still cameras are increasingly using CMOS sensors these days, and the CMOS sensors you'll find in them are at least equal in performance to their CCD cousins. It so happens that CMOS technology is moving quickly at the moment and many of the best sensors these days are CMOS. Unless shooting video, there's no reason to pick a camera based on whether it has a CCD or CMOS sensor.