You can block nasty people on Mastodon at a personal level, by clicking the "..." below their post or on their profile and selecting "Block". You can also block their entire server by selecting "Block domain".
However, personal blocks will not stop them from communicating with other people on your server.
Your server's admin can create server level blocks, which are much more powerful than personal blocks. Server level blocks completely prevent the blocked person communicating with anyone on your server.
If you see someone being a bully or doing other anti-social and nasty stuff, the best option might be to report them to your server's admin, by clicking "Report..." instead of "Block...". Reports can also be optionally forwarded anonymously to the nasty person's home server, where the admin can delete the nasty account if needed.
Server-level blocks can be made even more effective if your admin activates "Authorized fetch" (also known as "Secure mode"). Ask them about it.