It's a very neat effect, and easy to do. Ripple Training has a full video course on "Shapes, Paint Strokes, And Masks" that goes into more depth for these things than anyone else. But you should have a good basic education in Motion first, such as Michael Wohl's course here on macProVideo.com. But here's the super basic explanation.
Basically you draw a bezier line, shape it, round it out, etc. Apply a Shape Style to it, apply the Write On behavior and trim it up. This should be above your background image. Turn off the bezier paint stroke layer you just created, but leave the Write On behavior turned on. Select the background image layer, right-click it and chose "Add Image Mask". Then in the Inspector, drag your bezier paint stroke layer into the "Mask Image Source" well. Presto, done!
Your background should be revealed as if being painted or drawn on.