just to clarify, instances defederate from other instances. communities are hosted within instances. So when one instance defederates from another, all communities are included in that disconnection
while this is generally what most people talk about when speaking of defederation, admins can also decide to remove communities locally without blocking the entire instance.