First, remove all the keycaps. After all the keycaps are removed, use a brush to clean the inside of the keyboard of any dust and impurities from the base, then use a hair dryer to blow out the impurities. If you have a can of air, that is the best, whether you want to clean the keyboard or your trash can fan. Especially for keyboards, it can blow a lot of dust away without much effort. All you have to do is insert the straw-like plastic hose into the nose of the can and you're ready to blow away.)
However, you can't just start blowing compressed air on your keyboard at will. First take some precautions. Canned air won't get rid of all the dirt under your keys, but it will blow away everything visible, and the debris will scatter across your desk and floor in a nasty cloud. It's best to do this outdoors, or over a bathtub.
For particularly firm dirt, you can wipe it down with a cotton swab dipped in alcohol, then wipe the keyboard case clean with a soft cloth.
The last thing is to clean the keycaps, which can be cleaned directly in cold water for ten minutes, then taken out and wait for the keycaps to dry completely before reinstalling them.