So on one level, I'm following the melody/harmony. On another level, I'm inventing (or remembering?) substitutions that can work over that melody and harmony. On another level, I'm thinking about the overall flow of the improvisation, and how to achieve my artistic goals, express the feelings and ideas I have at the moment. On yet another level, I'm being purely technical - like making my hand slightly roll to play a downstroke on the E string followed by an upstroke on the B string without accidentally hitting the E string twice. On another level, I'm listening to the other musicians, with whom I'm generating a shared tempo, and who are also improvising, generating new ideas I can respond to while playing.
That's expertise. Being able to work on all this patterns simultaneously, some being totally orthogonal to others (like "roll my hand" vs "play a sixth instead of a fifth to imply relative minor").