Trans fats are formed during hydrogenation. Hydrogenation is a process by which unsaturated fats are bombarded with hydrogen. This process introduces hydrogens on opposite sides of a double bond of the chemical structure of the trans fat.
Trans fats do not occur naturally and are solid at room temperature. They are used commercially in foods in order to extend the shelf life of a food and to add texture.