How does wave particle duality work?
It is the phenomenon that light has a dual nature and can be considered as both a wave and a particle.
Some phenomena can only be explained if we consider light to travel as a wave, for example reflection, refraction, diffraction, interference (superposition), polarization, etc.
Some phenomena can only be explained if we consider light to travel as a particle, for example the photo-electric effect, the Compton effect, particle diffraction patterns, pair production, quantam physics principles, etc.
It may from this be concluded that all waves have a particle nature and assosciated momentum, and all particles have a corresponding wave nature and assosciated wavelength.
A photon of light (particle) for example has quantized energy