From SmashWiki, the Super Smash Bros. wiki
Alternate music pieces are music tracks that sometimes play in particular stages in Super Smash Bros. Melee and in all stages in Super Smash Bros. for Nintendo 3DS. These tunes can be triggered by unlocking a certain stage or extra or holding down a certain button combination; they also can be triggered randomly.
Alternate music for normal stages
Every time any one of these stages is loaded up in Vs. Mode or Training Mode, there is a 12.5% chance that the alternate music will play instead of the normal music. If L or R are held by all human players while the stage is loading, the alternate music will be forced to play. Great Bay and Temple's alternate songs will only be played when Young Link and Marth are unlocked, respectively. The rest of the alternate songs only get triggered when all stages have been unlocked. Battlefield and Final Destination stages have two separate songs from a Multi-Man mode as their alternate music. The rest of the alternate songs are from other games, with the exception of Mother 2.
The alternate music for normal stages are:
The alternate music can be forced again, but only R must be held in order to do this. There is a 15% chance that the alternate music will play without holding down the R button. The alternate tracks for stages are:
Alternate music is somewhat back, with there being two main soundtracks for every stage, but the player can now also choose from any music from the series that the chosen stage is from before battle (except for the menu). The alternate tracks are:
Alternate music for Adventure Mode stages in Super Smash Bros. Melee
On the screen that shows what stage is coming next in Adventure Mode, alternate music will play on some stages if the player holds down L or R, and then presses START, while keeping L or R pressed until the music starts. An alternate theme will play for some of the stages. However, this can only be done by Player 1, and it only works for the first stage in each area: for example, on the F-Zero Grand Prix, only the first level will have the special music, not the fight with Captain Falcon.
The following are stages that have alternate music in Adventure Mode:
Also, certain stages will play music not heard on the stage in Vs. Mode when they are played on in Adventure Mode:
Like the normal stages, there is also a 12% chance of the alternate music playing automatically.
Alternate main menu music
Once the player has unlocked all stages and characters, then while unlocking the Sound Test feature, an alternate music can play on the Menus of the game; unlike music for stages, however, the player cannot force the song to play on the Menus.
Alternate music for Target Test
The music can also be changed for any characters' Target Test, but for some reason only works with P1's controller. By holding either L or R before the stage is being loaded (even when restarting via the Pause menu), the music that would play during the Credits sequence after beating Classic or All-Star Mode with that character will play. This excludes the Ice Climbers, where the Icicle Mountain theme would automatically play while the alternate music function is unavailable.