Electronics Newbie - How can I mute speakers when 3.5mm is plugged into female jack? (with volume control)
This question is pretty old, but I can maybe elaborate on what the other answers are saying.

The socket has five pins - You might think this is odd, because your stereo plug only has three connections: Left, Right, Ground. What are these strange extra connections?

The symbol you have shows two connections with weird angled parts at the end. Those are the bits that actually interface with the plug. The top one is the tip, and the bottom one is the ring. The sleeve is connected to gnd. The other two connections are the ones that act "odd". Each of these is normally connected to one of the angled contacts, except when a plug is inserted. When the plug is inserted, they are not connected to anything.

This means that you can use these connections to detect if a plug is inserted or not. Going even further, you can use these to directly solve your problem. If you connect your audio source to the two angled pins, when nothing is inserted, audio will come out of the two non-angled pins, so you should connect those to your speakers. When the plug is inserted, it will disconnect those two pins, muting the signal to your speakers.

You shouldn't need any of those other components, except the potentiometer, which will need to be far smaller, around 20 ohms as Peter says. If you want to control the speaker and the jack with the same potentiometer, it should be in series with the audio, and you'll likely need two of them, or a dual one (to control both channels). Dont be tempted to put a single pot between the jack and ground, because you'll get strange sounding music as the common signals start to attenuate.