How do communities relate to food webs?
The Details
Ecological communities are groups of multiple (2+) species of either plants, animals and/or other organisms that interact in a unique habitat. More accurately (from Wikipedia and corroborated by Begon et al. (2006)), we can define an ecological community as an:

assemblage or association of populations of two or more different species occupying the same geographical area and in a particular time.

These organisms could be interacting in a number of ways:

As you can see, one or both species can be effected either positively, negatively or neutrally (not at all) in these various types of interspecific interactions.
I should note that a community doesn't have to contain all organisms within a certain habitat.

Sometimes we might limit our discussion of a community to a single guild or single trophic level. Other times we might use the terminology simply to describe two interacting species (either within or between guilds/trophic levels).

Really, &quot;communities&quot; are more conceptual &quot;units&quot; used to describe two or more interacting species. More accurately, it's an interaction between populations of 2+ species. In this way, community ecology is an extension of population ecology.


Food webs (i.e., a system of interlocking and interdependent food chains) are essentially summaries of the feeding relationships within an ecological community (Molles, 2010). In other words, they are focused strictly on trophic interactions. These trophic interactions are primarily concentrated within the (+,-) interactions between species. This means that the interactions that dictate a food web are going to consist mainly of consumption (predation/herbivory).

From University of Michigan (my emphasis):

Food webs are graphical depictions of the interconnections among species based on energy flow. Energy enters this biological web of life at the bottom of the [web], through the photosynthetic fixation of carbon by green plants.
Energy moves from lower to higher trophic (feeding) levels by consumption.



Example
An example of a community that does not qualify as a food web:

A community of plants includes just the plants that are competing in the same space and as a result make up (i.e., are classified as) some sort of vegetation type. These species are competing at the same trophic level and do not consume one another. This is classic ecological competition.

If we examine the trophic interaction between each of these plants with each of their sources of energy, each of their consumers, each of their consumers' consumers, etc. then we are talking about a food web.


Final Thoughts
So the term &quot;community&quot; is used generally to describe interacting species of organisms in a given habitat, while &quot;food webs&quot; describe a more specific aspect of a community -- the trophic interactions of the members of that community.

Of course, it could be the case that all species in a given community are represented in a food web, but this is not necessarily the case.

It could also be the case that not all species represented in a food web be part of the same community...


One could also consider food webs to be broader than a community because they can describe the trophic interactions of species/populations across communities. From this perspective, food webs &quot;lie at the interface of community and ecosystem ecology&quot; (Begon et al. 2006).

Citations:

Begon, M., C.R. Townsend &amp; J.L. Harper. 2006. Ecology: From individuals to ecosystems. Fourth edition. Blackwell Publishing Ltd. Malden, MA. pp 469 - 601.

Molles, M.C. 2010. Ecology: Concepts and Applications. Fifth edition.  McGraw-Hill. New York, NY. p. 544.