Oils may be partially hydrogenated to produce various ingredient oils. Lightly hydrogenated oils have very similar physical characteristics to regular soy oil but are more resistant to becoming rancid. Margarine oils need to be mostly solid at 32 °C, so that the margarine does not melt in warm rooms, yet it needs to be completely liquid at 37 °C , so that it doesn’t leave a “lardy” taste in the mouth.
Hardening vegetable oil is done by raising a blend of vegetable oil and a catalyst in near vacuum to very high temperatures and introducing hydrogen. This causes the carbon atoms of the oil to break double-bonds with other carbons, each carbon forming a new single-bond with a hydrogen atom. Adding these hydrogen atoms to the oil makes it more solid, raises the smoke point, and makes the oil more stable.