A bar of soap is made in a process that involves boiling vegetable oils or animal fats with an alkali and then removing the salt and excess alkali before adding perfume, colour and other enhancing products. Hundreds of years ago, the alkali used to make soap was often potash, which is the soluble part of ash left after burning vegetation or wood, and the fat used was often lard.
Nowadays most of the things that act like soap are actually surfactants (surface active agents). Shower gel, shampoo, liquid hand wash (and other products that clean and bubble) consist mainly of surfactants. The raw ingredients of surfactants are crude oil or vegetable oil but the process of manufacture is much more complicated than making soap. The process involves many stages including distillation, fractionation and hydrogenation.