What's the role of lysine in preventing infections?

Herpes. Lysine appears to interfere with herpes virus metabolism of arginine, so its use in infections is to reduce herpes flares (both cold sores as well as genital herpes).