Flaky piecrusts used to mean lard, or at least butter.
Solid fats are important in baking, as they separate sheets of dough into thin, independent flakes.
Traditional solid fats are animal-derived saturated fats such as lard and butter. Some vegetable fats such as coconut and palm kernel oils are solid, but they are more expensive than some liquid vegetable oils like corn oil, cottonseed oil, or soybean oil. These oils come from plants that are used for more than just the oil they provide, making them more economical to grow than plants grown only for their oil.
Vegetable oils can be made into solids by converting some of the double bonds in their molecules into single bonds.
This is done by adding hydrogen, and is called hydrogenation. A catalyst such as platinum is used to convert one or more double bonds to single bonds with an attached hydrogen.
Some of the double bonds are converted from the normal cis orientation with both hydrogens on the same side of the bond, to the trans orientation, with a hydrogen on either side of the bond. Such fats are called "trans" fats, and are implicated in cardiovascular problems.
With the double bonds converted to single bonds, the molecules can fold and twist more easily, and the fat is now a solid.
Shortening also contains pieces of fats, called monoglycerides and diglycerides. These are emulsifying agents that allow water and air to be whipped into the shortening, and help to thicken it and make it gel.