Thank you for your questions. First, vegetable oils are composed of long molecules that are mostly esters. In oils, the acids are from fats, thus called fatty acids, and the alcohols or esters are complex. Mother Nature does a very good job of utilizing these acids, alcohols, and esters to form oils and other pleasant smelling and tasting substances. However, as soon as these materials leave Mother Nature's nurturing hands, then this natural process reverses.
Rancidity is the natural oxidative chemical degradation of oils.
This process converts fatty acid esters of oils into free fatty acids by reaction with air and other materials. It is the free fatty acids that have the peculiar tainted smell of spoilage, such as is seen in butter and most any vegetable oil over time. Some oils are more prone to rancidity than others, but all vegetable oils easily degrade through this oxidation mechanism. It also contains esters of the methyl type. Any ester can be oxidized to an acid, but methyl esters are easier to degrade by this method.