This happens with your fretting hand when you are playing a lick and you don’t get your fingers positioned exactly right before it is time to pick the notes. You’d like to lift one or more of your fingers and reposition them a little better, but it is too late; you’re already using those fretted positions!
And often you can’t wait just a little to do it, either, as the next set of notes requires that you simply slide that same fretting hand position up or down the fret board without lifting them. You’re stuck in a bad fret rut.
Not much can be done here; just play through it as best you can and make sure next time to get the fretting right the first time.