Usually this is the result of a foreign object (dust, dirt, potato chip, pop-corn hull, bug, etc.) getting between the "striker" on the key and the rubber strip "bubble" that it presses against. If this is the case, a can of compressed air will usually take care of it. If not, then that section of rubber strip may need replacing. There are video instructions for doing that in YouTube, but it is certainly not a job for the technical faint of heart. If it is a foreign object that can be blown out, the best ways to prevent this is a dust cover when the keyboard is not in use and keeping all food and drink at least 10 feet away when it is in use. Also, you wipe your feet when you come in the door, so wash your hands before your touch the keys.
Good luck !