that it was only permitted to carry on Shabbat from one private domain--what the Talmud calls a reshut hayachid--to another when they are joined in an eruv. Thus the different houses adjoining a courtyard, or chatzeir, would create an eruv chatzeirot to enable the residents to carry items through their courtyard from house to house.
But in Eruvin 89a, we learn that things are not so straightforward. Take the example of two attached houses, which share a common wall.
from Adam Kirsch: Tablet: Why the Talmud Draws Imaginary Lines All Around Us--and Over Our Heads