Audio files (WAV, MP3, and OGG) can be played at specified points in time. They are like object declarations, not commands, so they aren't used in loops or triggers. However, you can place them on any of the four layers (though there's no concept of "overlapping" - all sounds will be mixed), so you can make sounds only occur if the player is in the Pass or Fail state.
The form of an audio sample declaration is:
For instance, to play a (short!) music track when the player gets a good ending on the beatmap (e.g., end in the Pass state), then play an explosion sound effect as part of the scene:
Sample,163520,2,"Audio\Best End.mp3",80 Sample,167201,2,"Audio\sfx\EndG-SmallExplosion.wav",100
Note the volume is lower for the music to make the sound effect stand out, and the layer for both is 2 (Pass).