This generally happens for one of two reasons:
An accumulation of dirt, dust, debris, or sticky liquid (e.g. colas, or other isotonics) that have seeped into the key mechanism.
Wear of the contact points of a specific key.
If it is only dirty, you can attempt to clean it. The problem is, that membrane keyboards tend to be nearly impossible to clean, as the methods that work on mechanical keyboards are not usable. If you only have dirt, dust, ash, or other solids, you can use compressed air to clean the mechanism.
If it is a spilled liquid residue, you can attempt to soak the keyboard mechanism, using very hot (but not boiling) distilled water. Do not use any other form of water!
The hot water will help dissolve the residue, but it is also easy to corrupt the contact points...
Soak the keybaord and shake it out several times, using compressed air to force the liquid through the keycap mechanisms. After a few treatments, dry out the mechanism as follows:
Use compressed air to fiercely blow out all liquid, several times.
Place keyboard, keys down, in a warm to hot, dry area, for one to two days.
Then, blow keyboard out again with compressed air, and set keyboard out again, keycaps up, for a day or two.
Failing to thoroughly dry it will certainly lead to damage of the KB, and potentially the mainboard of any system on which you use it.
It's usually best to do this kind of cleaning in lots, rather than one mechanism at a time. If you want to spend the time to clean it, rather than buying a very inexpensive replacement, that is your choice.