There is definitely an additional contact (and in some jacks, two!) that is connected to ground when the jack is empty, and is mechanically lifted from ground as soon as a plug of the proper diameter is inserted. This extra, non-audio circuit is opened as soon as the tip of the plug acts on the contact mechanism, and remains actuated until the plug is completely removed.
What I just described is called a "normally closed" switch. Some jacks contain a "normally open" switch instead, which is the opposite of what I just described, as it connects to ground only when a plug is in the jack.
In either case, the additional mechanical switch has nothing to do with the audio signals, and does not make any contact with the wiring connected to the plug. This additional mechanical switch is very well-insulated from all the wires and contacts that are connected to the audio circuitry, as it could really mess things up if it wasn't! This additional mechanical switch simply provides a signal to the equipment to allow it to sense when something has been inserted into the jack, and then act accordingly.
It's a relatively recent development, say no more than 20 years ago. The "inserted" signal pretty much needs to be acted upon by digital circuits like computers and sound cards, so it's not very effective in an old-school, pure- analog device.
Back in the pre-computer/smartphone days, some jacks included mechanical switching to disconnect the signal flow from it's normal destination and instead direct it to whatever was plugged in. This usually served to disconnect the speakers when headphones were plugged in, but with modern, high power amps, it is more than a little dangerous to do that, as it could blow up headphones, amps and eardrums. A previous comment included a schematic diagram of that kind of jack.