It depends on what you're using to view Mastodon.
If you're on your server's website, click on Notifications and then click the slider icon in the top right corner. This will let you change settings for what causes notification sounds etc. Note you can scroll this menu down, there are lots more settings below the scroll.
If you're using an app, have a look in its Settings section, different apps have different options in settings.