The science of plant communities is called phytosociology. It is part of geobotany. A more or less homogeneous unity of vegetation can be classified as belonging to an association in a similar way like a plant can be classified as belonging to a species. Similar associations are put together in an alliance (just like species are grouped together in a genus) and so on.
An example is the community frequent in Ibicencan garrigues called Teucrio piifortii-Corydethymetum capitati, named after two plants. The dominant plant in this community, however, is neither of these two plants but rosemary.