I can see black patches on it. What is the way to clean the kneaded eraser such that it doesn't leave any marks on the paper?
I can see black patches on it.
That is a part of normal use. Those black marks are graphite, charcoal and etc. that the eraser picked up from your working surface. That is the eraser doing its job as intended.
What you are supposed to do is fold / knead away those "dirty" parts back into the eraser so that non-black (the erasers original colour) parts are exposed so that you don't get unwanted or inefficient transfer. From rapidfireart.com on How to Clean a Kneaded Eraser:
Because kneaded erasers absorb graphite, they will become dirtier with use. To clean a kneaded eraser, you can stretch and knead it until the color turns light grey. Eventually they will become too dirty to use as graphite, charcoal, dust or other particles accumulate in the eraser.
So, at some point, you won't be able to keep using it and then it will be time to seek a replacement.
I just tried washing one under a running tap of warm water and lots dishwashing liquid. (I kneaded the rubber while I washed it.) Mine was dark because I used it to pick up charcoal.
Oddly enough it seemed to work with a small cube of rubber (5mm or 1/5"). One drawback is the consistency of the rubber became softer, so it was a little less grippy on the paper -- but I was a still able to remove some lines of 6H pencil.
Looking at the rubber now it seems a shade darker, so perhaps all I have done is to use the detergent to more evenly spread the black throughout the kneadable eraser. In any case it seemed to work.
Might be worth trying for some.
Abrasive, a file, sandpaper. Those are the cleaning tools respectively. Rubber block for grinding wheels or sandpaper. Sandpaper or other abrasive media for erasers. Truly a Ying/Yang relationship.