Short answer - chemistry!
Long answer - Lye (sodium hydroxide) is combined with liquid, and then with oils, to start the chemical change in the oils that saponify them, creating a chemical change that ends in safe, lye-free soap! Lye does not remain in the final product.