Since a couple of years, the use of potentiometers to adjust the speaker volume has decreased. In laptops, an integrated circuit (IC) receives a digital value representing the loudness. In receivers, which still have potentiometers they use a DC to control the loudness. Traditionally, the potentiometers were in the in signal path of the pre-amplifier but that could cause some scratching noises after some time.
Edit: A common way to realise a digital potentiometer on a physical level is a resistor-ladder within the IC.
Latest Answers