This is most likely caused by a the failure of the washer, the thin rubber ring that provides a seal between two metal components. If you turn your water off you can remove the faucet and remove the washer, take it to any hardware store and buy a replacement, they are very cheap. Then reassemble the faucet.
When you pull the small lever to turn on your shower head you're really just blocking the outlet for the faucet. This forces water further up the pipe to the shower head. If water is still pouring from the faucet you may simply need a new plunger mechanism. This should reroute water to the shower head again.
Shower fixtures for tubs nearly all work by diverting water from a common "in" pipe to one of two "out" pipes. Set to one position, the water goes to the tub. Set to the other, the water goes to the shower head. The diverter valve rarely makes a perfect seal with the sides of the pipe, so it leaks.
You could be experiencing 'blow by'; a condition where water squeezes by the valve seal, despite the fact that it is closed. There could be a couple reasons for this: the seal could be corroded and not forming a waterproof barrier when shut or there could be a problem with the shut off and it is not completely closing.