This isn't possible on Lemmy atm, but it is possible on kbin.
Lemmy Support
Support / questions about Lemmy.
I don't believe this feature exists yet, but I imagine it won't be long before it does. As far as I know, instances can only be blocked by the local admin.
Or choose an instance that doesn't federate with those instances that you don't want to see. Those will usually be the ones that don't allow NSFW content.
Here's a good comparison: https://github.com/maltfield/awesome-lemmy-instances
Note that you can configure your account to not view NSFW content - that would mean that you'd still see content from those instances, but not anything flagged as NSFW.
i already have an instance. and i am happy with the size and moderation of it... I dont think it is too much to ask as a way of moderating my personal content. It means i can stay where i am, and not let someone else decide what i dont want to see, or what the line is for acceptable NSFW is.
Cheers
Those are the options for now, so do what you want with the info.
If you want to see this change, I recommend creating a feature request for Lemmy: https://github.com/LemmyNet/lemmy/issues/new/choose