Rancidity occurs when oils deteriorate, causing unpleasant odors and flavors. There are two main types: oxidative rancidity due to reaction with oxygen, and hydrolytic rancidity involving moisture. Oxidation degrades oil quality over time through chemical reactions, producing rancid smells. Temperature, light, oxygen, and metals can accelerate oxidation, while antioxidants can slow the reaction. Hydrolysis involves enzymes breaking down the oil, or microbes degrading it if water is present. Proper storage controls like moisture, oxygen, and temperature protection can help prevent rancidity.