In order to understand the difference between these two things, you need to understand the meanings of “homogeneity” and “heterogeneity.” The prefix “homo” means “same” while the prefix “hetero,” means different. Therefore, community homogeneity exists when the members of the community share characteristics to a large degree whereas community heterogeneity exists when there are many differences in the characteristics of the various people in the community.
In the social sciences, there are many characteristics that we can take into account when calling a community either homogeneous or heterogeneous. We might look at the racial and/or ethnic makeup of a community. We might look at the levels of education achieved by its members. We might look at their levels of wealth and income. We might look at the degree to which they are religious. A community can be described as homogeneous (similar or the same) or heterogeneous (varied, or different) on a variety of different characteristics like these.