Through light magic that is inborn inside the unicorn. The light and goodness that fills a baby unicorn grows and elongates into the horn on its forehead, giving it the power to purify air and water (or any liquid) as well as curing any physical injury.