How to do this?

let’s say i have an “s” shape line drawing, and i want it to appear (or dissapear) following its own path, how can i do that??? it could be not only a line, but any kind of shape or “road”, that has some linear form.
any idea about how to do this???