I'll assume it's the rear you're working on. The indexing in the shifter itself is set and can't be adjusted, but cable tension needs to be sorted to allow those indexed clicks to shift the chain cleanly and smoothly.
Start by putting the bike in a stand or raising the rear wheel and get the chain in the biggest chainring on a double, or middle ring on a triple. Fire off the shifter so it's in the smallest cog. Undo the clamp bolt holding the cable at the rear mech, but don't remove the cable, just let it pass freely through the clamp. Now wind the barrel adjuster clockwise into the shifter all the way, then back out a full turn.
Using a pair of pliers pull the cable end at the rear mech taut, so that there's no slack, but not a great deal of tension either. Now tighten the clamp bolt.
Whilst turning the pedals slowly, click the shifter once. The chain needs to shift smoothly and immediately onto the next cog. If it doesn't, fire the shifter off and then add a bit of tension by winding the barrel adjuster out in quarter turn increments until it shifts with one click. As soon as it does, try another click and see if it changes to the next cog up. If it does, again smoothly, then try the next few cogs. You're aiming for that sweetspot where each click lifts the chain one cog. Once you've got that you need to check that the cable isn't too tight, and that the chain will drop a cog for each release click. Check this on the other chainring/s as well.
If it still doesn't function after that, you may need to check rear mech alignment, cable routing, and sticky or worn cable inners or outers.