Kojic acid works by inhibiting the enzyme tyrosinase, which is crucial in the production of melanin. By blocking this enzyme, kojic acid reduces the formation of melanin, leading to a lighter and more even skin tone. This mechanism is particularly useful in treating melasma, a common condition in women characterized by dark, discolored patches on the skin.