Community owners can decide if a community has a relation with another community. In order to do so, the user must be the owner of both communities he wants to relate.
To relate two communities go to Community Settings > Basic.
Please note: the type of relation, hierarchical or flat, is decided by a general admin setting and it applies to all communities and stand-alones.