To know the difference between the optical zoom and digital zoom you need to know the detail description of both zooms separately. Actually zoom function is mostly used in or by glass lenses in specific fields like photography, video making and in research departments in microscopes.
An optical zoom lens is a mechanical assembly of two or more lens elements.it change the its focal length and samely angle of view. By opposing its prime lens. This prime lens has the fixed focal length. They are mostly used in still, video, and motion picture cameras, some binoculars, microscopes and telescopes, and in other optical instruments.
Zoom lenses normally defined in their longest and shortest focal length. As example if a zoom lens has a 100mm to 400 mm focal length will be described as 4:1 or 4x zoom where x defines 100 calculation.
Digital zoom is a method of decreasing the readily visible (apparent) angle of view of a digital photographic and video image. Digital zoom is skilled by cropping down to centred area with the same aspect ratio just like its original. It usually also interpolating the result back up to the pixel dimensions of the original.
It is completed totally electronically. And no camera optical adjustment is involved also no optical resolution taken in total process.
Because interpolation disturbs the original pixel layout of a picture and thus called detrimental to image quality. That's why some times digital zoom are however better option against manual corping in post photography.