Then you very likely either have a wonky jack on your computer or a short in the line between the headphone plug and the headphones.
The computer side could be anything from dirt to the jack having developed cracks in the solder where it connects to the motherboard. Headphones are notorious for developing issues somewhere between where they connect to the computer and where the tiny speakers are that deliver sound.
You're now in a situation where detective mode is necessary. Try the headphones on some other device and see how they work. Try other headphones or a set of external speakers on the computer and see if they work. One of the two should likely not work correctly, telling you on which side of the equation the problem lies.
Brian AKA Bri the Tech Guy (website in my user profile) - Windows 10 Home, 64-Bit, Version 1803, Build 17134
Memory is a crazy woman that hoards rags and throws away food.
~ Austin O'Malley