What type of food? Canned or packaged?
In most cases, it should be safe to eat although the quality and/or appearance may be rather less than it should be.
As with any other food, I suggest you go by this cardinal rule: When in doubt, throw it out.