When fats and oils are left open, they get oxidized in the presence of air, their smell and taste change. This means the oxidation is the main cause for rancidity in fats and oil.
The substances which prevent oxidation of the food items are called antioxidants. Example, Nitrogen is an inert gas and does not oxidize the food. Thus, it is used as antioxidants by chips manufactures.