If you get water out of a tub spout when the shower is running, then there is something wrong with the diverter. Most faucets use either a diverter or a third handle in the center of the faucet to change the direction of the water up to the shower head. Diverter tub spouts use a disk that closes off the opening of the tub spout and forces the water up to the shower head. Some faucets use a push button in the handle assembly to divert the water up to the shower head. Finally other faucets use a separate handle inside the faucet body which changes the flow direction.
To fix your leaking faucet, disassemble the diverter and flush it out to make sure there isn't debris blocking the closing of the disk, handle or button. Shut off the water to the faucet if you are going to work on the faucet body for the handle diverters or the push button diverter, or simply remove a tub spout diverter and replace it or clean it. If it is calcium and mineral deposits, soak the parts in vinegar overnight then clean with a soft brush to remove the buildup.