While you are hiking or camping, you are putting yourself into an environment that belongs to the wild animals. One of their top priorities is finding food, and animals who have become accustomed to campers know that they are easy sources of food.
You must always keep food safe at night by hanging it in a tree, placing it in a vehicle, or other critter-safe location. Various commercial containers are available for backpackers to car campers. Some campgrounds where there are known animal problems may provide lockers, bear poles, etc.
But there are some simple things that you can do to reduce the chance that animals will steal the food you have planned for yourself. Whether you are concerned about bears or chipmunks, these tips come under the general heading of "stay clean."
Stay Clean Tip #1
Keep all foods in sealed plastic bags. This reduces the odors that transfer to fabrics in clothing and packs. Food odors in your clothes will remain until washed. If there are crumbs in the bottom of your pack pockets, or in the corners of your tent floor, you are just asking for chipmunks or mice to chew through the materials and damage your gear.
Stay Clean Tip #2
Don't keep any food or even empty wrappers in your tent. A couple of layers of nylon isn't going to stop any animal that detects food odors. Small animals may only be annoying and damaging to your gear if they chew through the fabric. A large animal may also harm you.
Stay Clean Tip #3
If you have a picnic table or other food preparation/serving surface, be sure it is clean. Wash all dishes and utensils thoroughly. Wipe down surfaces, preferably with a bleach solution.
Stay Clean Tip #4
Trash should be dealt with properly. Keep all trash in a sealed plastic bag if you are not in a campsite where you can place it in a dumpster or other sealed container at night. Keep the sealed trash with your food supply. However you choose to protect the food (hanging, in a vehicle, in other sealed container), place the trash in the same place.
Stay Clean Tip #5
Waste should be dealt with properly. Don't dump crumbs or dishwater near your tent. Carry these into the woods a good distance from your sleeping area for disposal.
Stay Clean Tip #6
Don't feed the animals. This sounds quite obvious, but so many times there are small mammals or birds that have obviously been fed by someone because they come right up to campers or hikers, expecting a handout. Feeding animals is the wrong choice for several reasons. In the first place, it trains them to look for food around humans. They won't know the difference between being offered a treat or breaking into your pack to find one. Feeding animals is also usually bad for them. A diet heavy in bread crumbs, potato chips, etc is no better for wildlife than it is for humans.
Basic sanitation and common sense can go a long way toward preventing the loss of camping food to animals of any size.