In a mode-locked laser, various longitudinal modes of the laser cavity are locked in phase, resulting in the generation of short pulses. This can be achieved through active or passive techniques. Active mode locking involves using an external modulator, while passive mode locking employs a saturable absorber. The constructive interference of these modes leads to a significant reduction in pulse duration.