On most guitar pedals, the input jack has two functions. One, it gets the signal from the guitar pickups and sends that signal to the effect circuitry.
The other thing that it does is turn the battery off and on. This prevents the battery from being drained with the effect is not being used. If the battery powers the effect when the guitar is not being played, then the effect will still use enough current to wear out the battery in about ten hours. Many effects use about the same amount of power regardless of whether the guitar signal is very loud or not playing at all. It's necessary to have a way to shut off the battery.
Guitar effects use a three connector jack to do this. These jacks are used for stereos to have both channels on one plug. The plug has three parts: a tip, a ring, and a sleeve. The sleeve is the section near the plastic handle and the ring is the middle part.
In order for the battery to power the effect, it needs to have a connection between the battery negative terminal and the effect's ground.
The input jack has the effect's ground wire on the sleeve and the battery negative terminal on the ring. When there is no guitar plugged into the input, there is no connection between the effect ground and the battery negative. No electrical power flows and the battery doesn't lose its charge.
The guitar plug has only two sections: the tip and the sleeve. The sleeve is the zero volts part and is called the ground. The guitar signal voltage is on the tip. When the guitar plug is pushed fully into the effect's input jack, the solid sleeve of the guitar plug makes an electrical connection between the battery negative and the effect's ground. Power flows from the battery into the effect electronics.
Whether the effect is heard on the guitar notes depends on the foot switch. The foot switch either completely bypasses the guitar signal from the input jack to the output jack of the effect, or (more likely) it allows the guitar signal to go through the effect's electronics and prevents it from mixing with the original guitar signal at the output of the electronic circuit.
On the input jack, the wire going to the other jack or the LED will be the effect ground wire. The battery negative terminal will go a second tab on the input jack. The third wire will go to the circuit board. On the board, the guitar input will almost always go directly into a capacitor as the first electronic component.
Sometimes, after hundreds of 'cycles' or insertions of the guitar cable into the effect, the metal tab on the input jack that presses against the guitar plug's tip will break off. In this case, the effect powers up fine, but the amp plays no sound from the guitar. Plugging the guitar directly into the amp works fine. This is usually an easy thing to fix by replacing the input jack of the effect. It can be difficult to find a new jack that fits.
Another thing that goes wrong often in effects is the foot switch breaking. This is often a very cheap (15 cent), very light pushbutton that switches electronic signals instead working mechanically. The guitar effect will play but won't switch off, or the guitar will play through the amp with no effect. Hitting the foot switch has no effect. In this case, replace the bad switch.
Or, after many years, the switch will wear out and it takes many good stomps on the pedal rocker to get the effect to turn off and on. In this case, adding a capacitor across the pushbutton switch on the circuit board will clean it up and make it work well. Any capacitor value from .005 to .2 microFarads will work.
I hope this helps clear up the mysteries of the input jack.