First of all, have a look at the documentation, it explains how audio works in Godot: http://docs.godotengine.org/en/3.1/tutorials/audio/index.html
Then, in code you can either modify individual AudioStreamPlayers
: https://docs.godotengine.org/en/3.1/classes/class_audiostreamplayer.html
Or use the AudioServer
API to change global volumes: https://docs.godotengine.org/en/3.1/classes/class_audioserver.html
Using the latter, for example, if you have two buses, one for "Music" and one for "Sounds", you can change their volume like this:
var music_bus = AudioServer.get_bus_index("Music")
var sounds_bus = AudioServer.get_bus_index("Sounds")
AudioServer.set_bus_volume_db(music_bus, -10.0)
AudioServer.set_bus_volume_db(sounds_bus, -3.0)
Note: by default Godot only has a "Master" bus (the main one), but you can create new ones specifically for music, sounds and other things.