The intentional volume adjustments you hear with commercials are adjustments to the continuous overall volume or what is technically called the Dynamic Range of an audio mix. Advertisers intentionally narrow this range in the audio mix such that the loud signals are as loud as they can go, while the soft sounds stay medium-loud instead of going down to their normal “low” volume range.
An electronic processor called a Compressor does this to the signal, and is usually applied to the sound mix before the “Master” tape is finished. The master that is distributed to all of the broadcast stations already has this compression built in to the commercial, so it’s not the stations that do this, it’s the companies who are paying for the time slot to post their advertisement.
I was told awhile back that the main reason this is done is because most viewers will get up from their seat during a commercial and go to the bathroom, kitchen, or other part of the house. The louder commercial will have a farther physical “reach” if the audio mix is highly compressed. So the advertisers want you to hear their ad even if you get up and walk away!
Incidentally this is a convention that has been applied generally to commercial ads in all media, as you can also pick this up in radio, movie trailers, and even home video DVDs. In the case of radio, the compressed mix can still be heard in the event that the listener turns down the volume. Most advertisers are betting that most listeners turn it down versus changing the channel (easier to do than timing a channel change so that you don’t miss your program).
Normal television programs (and movies) don’t follow this rule, and take advantage of the entire “range” of volume for maximum effect; their audio mixes don’t follow as “tight” a compression ratio as commercial ads do; next time you step into a movie theatre, take notice of the perception of the movie trailers’ “loudness” versus the movie you paid to see.