Hydrogenation:

Hydrogenated fat is created by bubbling hydrogen through 250 to 400 degree hot vegetable oil in the presence of a metal catalyst, usually nickel or platinum. The process can take several hours. Oleic acid (C18:1) and linoleic acid (C18:2) are both converted to stearic acid (C18:0) when fully saturated, but fully saturated fats are too waxy and solid for use. Hence the process is stopped at partial hydrogenation.

You cannot accidentally make trans or saturated fatty acids at home on your range when heating olive oil or other oils.