I can play a small amount of pentatonic-based lead guitar but being mostly self-taught, my technique is quite poor. As I take my finger off the fret, sometimes the open string will sound. How do I stop this from happening?
As simple and useless as it sounds, just practice! Most thing when you just go for it fall into place. Of course you can develop some bad habits but if you ever get good people will be trying to copy your technique.
If you are trying to improvise/solo then just go for it. Don't try to think about it too much, specially at the start(because you need to develop your instincts). There are many guitarists that make quite a few bucks without having any clue to what they are doing(but subconsciously they do).
When you become more comfortable, your fingers more flexible, and more relaxed your mind will subconsciously work on the problem. I never specifically practiced left hand muting but I do it all the time and find myself using the tips of my fingers to mute strings I don't want to hear. (e.g., not fretting with the very tip but sort flat so that your tip touches the string above.)
The most important thing is to have fun and just go for it. Most of the time when your consciously worried about if something is wrong or not then it will be(you'll end up making those mistakes your trying to avoid). But if you learn to just go for it and have fun and let it flow out subconsciously you'll do pretty good.
This isn't to say don't specifically practice anything but don't spend too much time on it. Just be aware of things(like you are) note it mentally(say to yourself out loud what the problem is and maybe think about it for a min or two) then let your subconscious deal with it.
We've all heard about "people"(retards) being able to sit down at a piano and play something never having played the piano before. The mind is quite amazing and many times we over think things.
There are a few things you can do:
If the sounding string is the one you just fretted, you could try dampening with either the palm/or another part your picking hand, or with your fretting hand, or a combination of both. I tend to leave my fretting hand on the strings most of the time whilst notes aren't sounding, especially at any kind of volume.
In addition to this, look at how your fretting the note and how your taking your finger off the string, are you pulling it to one-side accidentally, are you taking it off lethargically, ideally you want to have fairly fast finger speed fretting the note and taking it off again. that's the kind of thing that comes with practice.
Also check how the fretted note actually sounds, if it doesn't sound clear then that might be where you problem is (if your not fretting it cleanly, your unlikely to release cleanly).
If the sounding string is a neighbouring string Then most of the above still applies however you might want to have a look at your picking hand as well.
If your having real problems, there are guitarists who use padded elastic bands around the top of their necks to dampen the strings whilst soloing, maybe something that you want to try.
Edit: Heres one guy who uses a band Its not in use in this video, but you can see it above his nut.
It seems like you're failing to properly mute the strings you are not playing.
Use the fleshy part of your right hand to mute the lower strings, and the length of your left hand fingers to mute the higher strings. After you practice it a little, it becomes second nature, and you will unconsciously mute the string before it has the chance to sound open.