What is the difference between digital and optical zoom?

What is the difference between digital and optical zoom? Optical zoom leverages the physical change in a lens to adjust the distance between camera sensor and subject, whereas digital zoom uses magnification technology to enlarge an area of an image (thereby compromising the integrity of the picture by cutting down on the megapixels).

Optical zoom leverages the physical change in a lens to adjust the distance between camera sensor and subject, whereas digital zoom uses magnification technology to enlarge an area of an image (thereby compromising the integrity of the picture by cutting down on the megapixels).