Processing and improper storage practices can expose food items to heat or oxygen which causes spoiling or deterioration.
In ancient times, salt was used to cure meats and fish to preserve them longer while sugar was added to fruits to prevent spoilage. Certain herbs, spices and vinegar can also be used as preservatives along with antioxidants mostly vitamin C and vitamin E (Antioxidant is a molecule that inhibits or stops the oxidation of other molecule. Oxidation is a chemical reaction that can produce free radicals leading to chain reactions that may damage cells. Vitamin C present in citrus fruits like orange, lemon, and blackberries are the examples of antioxidant.)
Certain FDA (Food and Drug Administration) approved chemicals also help in extending life of food for longer times.
In our daily life, we all face this problem that how to preserve food or extend its life but by knowing little science we can sort out this problem. For example, in rainy season biscuits becomes less crunchy even if they are stored in a closely packed container or once they are opened they are no longer so tasty. So, to prevent them from spoilage we can put the biscuits in a sugar container by which they will remain crunchy for longer.