Sparrows are opportunistic feeders and will eat a wide variety of foods, including seeds, grains, fruits, insects, and even small vertebrates. They will often visit bird feeders and can become quite tame if they are fed regularly.
In the wild, sparrows will typically forage for food on the ground or in low vegetation. They will also sometimes fly out to catch insects in mid-air. When they find a good source of food, they will often cache it for later consumption.
Sparrows are important members of the ecosystem and help to control the population of insects. They are also a source of food for larger predators, such as hawks and owls.