Squirrels eat all kinds of nuts, including acorns, pine nuts, walnuts, almonds, hazelnuts and peanuts. The types of nuts squirrels eat depend on what's typically available in the habitat they occupy.
Nuts are a squirrel's primary food source. Squirrels don't hibernate, so a main component of their year-round activity is gathering and hoarding nuts so they always have enough to eat. Once a squirrel finds a nut, it will either eat it on the spot or run off to find a place to bury it.
Researchers have studied how squirrels remember where they have sequestered their nuts, hypothesizing that they use a combination of smell, memory and landmarks. Squirrels seem to have significantly more success finding their own caches of nuts hidden in an area than finding random hoards collected by other squirrels in the same area, leading to the conclusion that retrieval involves more than just sensory input, such as smell.
Squirrels also eat seeds, conifer cones, fruits, fungi and green vegetation and will adapt to eating almost anything at all, if their preferred foods are scarce. In urban areas, it's not unusual to see squirrels eating discarded junk food, such as pizza. They will even eat insects, eggs, dead birds or snakes and smaller rodents when faced with hunger.