Members of the same community do not need to work together, but they will usually be aware of each other's research and publications, and attend the same conferences. Peer reviews of results is also almost always done by members of the same community.
Sometimes the term scientific community is also used to describe the community of all scientists.