There are two types of subwoofers, passive or active (usually called powered).
A passive subwoofer receives it's power from the receiver. A powered subwoofer needs it's own power source so it needs to be plugged into a wall socket.
A passive subwoofer receives both the signal and power to run from the receiver. Because of this, during some peak moments (i.e., lots explosions), the receiver may struggle to provide enough power to all the speakers and the subwoofer at the same time.
A powered subwoofer on the other hand, always has fresh power directly from it's own power source. The only thing the receiver does for a powered subwoofer is send it the audio signals it needs to play.
It's not really an issue for most people though. You will only notice it if you compared a passive and powered subwoofer side by side or if you're an audio enthusiast.