As mentioned above, you'll want to focus on the pivot of the knife and the locking surfaces.
If you've just got some light pocket lint, you can usually use a toothpick, screwdriver, or other probe to remove it.
If you've got sand and grit, you'll likely want to use warm, soapy water and wash the knife with a bristle brush (I like to use an old toothbrush). If you do go this route, go ahead and brush down the entire knife including the blade and the handle scales. Often, this is all it takes to restore your handle scales to their original luster. Don't be afraid to get the internals wet or soapy, remember that's the most important area to clean. Just make sure to rinse well.
If the knife has an excess of sticky or grimy buildup that won't come out with either of these methods, try placing the knife in a bowl of warm water, which should help loosen the grime. A comment below from Instructable user Denger
mentions that one should be careful or avoid using this method on knives using natural materials such as wood, abalone, or mother-of-pearl, and that even synthetic handles may be damaged if left for too long in water at or close to boiling temperatures. Then try the probing method, followed by the wash method. This should take care of even the toughest residue.
If your knife is still gritty or difficult to open, you may need to disassemble the knife for a more thorough cleaning, which we won't cover in this article. You will likely need specialty tools and the process will vary widely depending on what knife you're working on. Many knife manufacturers will also tell you that disassembling your knife will void your warranty.
If you have used either of the wet methods for cleaning your knife, be sure to wipe up any excess water and allow the knife to air-dry for at least 15 minutes before moving on to lubrication. Even if your knife uses stainless steel, it may still be subject to corrosion.