I'm assuming you mean the hollow paths left out by the characters.
The way I see it, you have a layer of the "dug out dirt" either above or below the gameplay layer.
Then you use a round invisible object on character as a Mask so it either "cuts away" the pieces of layer it moves through or rather puts the dirt pieces ontop of the layer.
Another way is to make it spawn a "dirt circle" ontop of the character every time he moves one pixel in any direction, but that would mean having an obscene amount of sprites on the screen eventually and even though they're static i'm not sure how the engine would handle those very well.
I believe WebGL effects are responsible for these things, but since i'm not using WebGL at all I can't really help further than that, sorry.