Other than that, the instances themselves simply choose not to federate with questionable instances. This happens in an almost organic way where if an instance refuses to block federation with another questionable instance, other instances will then also refuse to federate with that instance.
The result is a network where hate-speech and undesirable content has been almost organically filtered out.
But keep in mind that the (client) apps themselves are more like web browsers. Anyone can host their own website and access its content through one of these apps. This also means that instances which are blocked by an app can very easily circumvent that as well.
(Sorry for my bad english and repeatedly using the word "instances")