Laser hair removal—a process that involves zapping hair follicles with a concentrated beam of light—may look like magic to the naked eye, but there's a lot of science involved in smoothing out those patches of skin. Derek Muller and the team behind the Veritasium YouTube channel recently shared a video that explains how the procedure works, close up and in slow motion.

The footage shows infrared radiation hitting the follicles. The flashes of light were made visible by the camera's sensor, but were invisible to everyone watching in the room. In the beginning, each pulse of the laser is said to have lasted 1.5 milliseconds, with six pulses happening at a time. As more power was delivered to the laser, things got worse for the targeted hair. As the hair is zapped away, puffs of smoke rise from the spot where the hair used to be, which the specialist in the video above calls "laser plume."

"It looks like a shootout at the O.K. Corral," Muller said (a historical reference to an Old West gunfight from 1881.)

So how exactly do those zaps remove the hair? "The objective is not to destroy the hair. It is to actually use the hair to destroy the germ cells in the follicle that produce the hair in the first place," Muller explains.

And the combination of your particular hair and skin could affect the process, according to Muller. "The idea with laser hair removal is to get the melanin in dark hairs to absorb the laser light without the skin around it absorbing much of that energy," he says. "So, it actually works best if you have really dark hairs and light skin."

He adds that infrared light is used because melanin absorbs light at a different part of the spectrum (around the 1000nm wavelength) from other skin molecules, such as water. As the melanin is absorbed, the follicles heat up and the water inside is vaporized. Learn more about the process in the video above.

Images via YouTube.