In sociological terms, the major difference between a community and a society has to do with their respective sizes.
A society is a much larger group than a community. A society can be defined as a group of people that share a defined territory and who have a shared culture. They do not, of course, have to share every single aspect of their culture, but they have to have the same general culture. Therefore, we would typically say that Americans form a society because we occupy the United States and because we generally share an American culture.
By contrast, a community is rather a small entity in sociological terms. A community can only consist of people who typically interact with one another. Two people cannot be part of a community if they do not tend to interact with one another on a relatively intimate basis. Therefore, a community is something whose size is limited by the ability of people to interact with one another on a personal basis.
We can say, then, that a community is a much smaller and more intimate grouping than a society is.
The difference between a society and a community comes down to two main characteristics: size and interaction. A community and a society can be any size that you want. There isn't a "minimum" number of people needed for either (as long as you don't take extremes like 2-3 people). What is generally understood as a key size difference is that a community is smaller than a society.
The size factor is of secondary importance, if you ask me. The level of interaction is more important. A society could be huge, and span hundreds or thousands of miles. The population of the United States could be considered a society -- the American society. Within that society though are many, many smaller communities. The key factor with a community is that the people within it must have some level of interaction with each other.
Let's use a city as an example. I live in San Diego. San Diegans are all part of the San Diego city and SoCal culture. If you live here, you know what I mean. That is my society. Within that society, I teach at a small school. That would be a community, because there is a high level of interaction between me, my co-workers, and my students. I am not part of the accounting firm across the city. That's a different community of people. I am a member of my neighborhood community, but I am not a member of my brother's neighborhood community. But I do belong to the American society that my brother is also a part of.
In as much as a group of individuals is necessary for the existence of both a society and a community, there are distinct differences between the two. A community refers to a group of individuals residing in a specific geographic location whereas a society refers to a system of social relationships. This brings us to the second difference whereby a community is concrete in nature and can be identified physically contrary to a society which is a mental construct and abstract in nature. Society being a system of social relationships lacks geographic limitations and so can extend globally as opposed to a community which has geographical specifications hence is confined locally. Another difference is that whereas it is necessary for individuals in a community to share common interests and goals, it is not necessary for individuals in a society to share the same elements. Also, a community is smaller than a society in that a society can comprise of several communities but the reverse is impossible.