This isn't really as "shader" question. However....
The app you're indicating saves a record of where the pen has been. In certain (user-selected) circumstances, as the pen moves the app will quickly draw lots of faint lines between the current pen location and selected other previous pen locations.
The modes described are different tunings of the way the lines are drawn, and of the rules for adding these lines.
Hope that gets you on your way -- you could rough-out something like this in html5 or processing very quickly to teach yourself a lot about the dynamics, I'm sure.