Below is from Wikipedia
In the early 21st century it was discovered that melamine foam was an effective abrasive cleaner. The open cell foam is microporous and its polymeric substance is extremely hard, so that when used for cleaning it works like extremely fine sandpaper, getting into tiny grooves and pits in the object being cleaned. On a larger scale the material feels soft. Because the bubbles interconnect, its structure is more like a maze of fibreglass strands than like the array of separate bubbles in, for example, styrofoam.
Rubbing with slightly moistened foam may remove otherwise "uncleanable" external markings from surfaces. For example, it can remove crayon, magic marker, and grease from painted walls, wood finishings, plastic-adhering paints from treated wooden tables, adhesive residue, and grime from hub caps. The surface being cleaned may be finely scratched if not hard. The foam wears away, rather like a pencil eraser, and leaves a slight residue behind which can be rinsed away.
Melamine foam for cleaning uses is supplied by several companies under brand names such as:
Mr. Clean Magic Eraser
3M Scotch Brite Easy Erasing Pad
Coralite Ultimate Sponge
a generic "dirt eraser"