They are made from oils. In general, oils contain carbon-carbon double bonds, and solid fats do not.
The trans fats are made by hydrogenating the oil, increasing its molecular weight and making it solid at room temperature.
The hydrogen can add itself to the double bond to form either a cis-hydrogenated fat or a trans-hydrogenated fat.
\C=C/
/ \ before hydrogenating
H H H
l l l l
-C-C- -C-C-
l l cis-hydrogenated l l
H trans-hydrogenated
In the trans form the hydrogen atoms add themselves on the same side of the double bond, in the trans form they are on opposite sides.
The trans ones are often the ones used in commercial products. So, if you make cakes and biscuits yourself, you know what goes in it, and you can either use butter, or oil, depending on your preference.
Hope that helps.