Optical zoom is the use of a lens adjustment to increase the size of the image that is projected onto the camera sensor. This has the effect of the making the apparent image larger, meaning that for a fixed viewpoint such as a camera sensor, the image will appear zoomed in.
Digital zoom increases the size of the image to the same extent, but does so in camera by increasing the size of each pixel, not using the lens as with optical zoom. This reduces image quality and resolution.
Comparing optical zoom vs digital zoom, this all means that optical zoom gives a much better image quality than digital zoom.
The below image shows you the difference between optical zoom and digital zoom in practice. The original image has had 3x optical zoom applied in one example, and 3x digital zoom in the other. Note that the quality is much worse on the image enlarged with digital zoom.
Optical Zoom is the preferred method of zooming in to objects in the distance, as DSLR optical zoom lenses do not degrade image quality. All zoom lenses found on film cameras are optical zooms, and this is still the most popular zoom method. Using optical zoom in camera requires a lens with movable glass elements. This is denoted on the lens by having multiple focal lengths listed in the form ‘X – Y mm’.
Digital Zoom enlarges the pixels of the image using software. This results in a lower image quality and lower resolution, with a more ‘blocky’ look to your images. You should avoid digital zoom in camera in favor of optical zoom, where possible.