Where are you plugging the headphones into? A port on the speakers? A port on the computer? A splitter which the speakers are plugged into too?
In the first case, the speakers should disable their output when you plug headphones in. The speakers either don't support that (unlikely) or are defective.
In the second case, the computer should disable the speaker output when headphones are plugged in, BUT not all computers support it. It may be a hardware issue that doesn't support it, it may be the drivers at fault. At any rate, it is NOT Windows's fault directly.
In the last case ... well yeah, neither the computer nor the speakers know anything about the headphones. Turn the speakers off.
