Garlic contains allicin, a compound that has antiviral antibacterial, and immune-boosting properties. It may help prevent colds or shorten their duration.