make a stroke from a path in after effect
There are many ways to do this - here is one:

Make a null object
Make a mask path on the null layer using the pen
Set a single keyframe on the mask's path
Go to your object (e.g. a star in this example)
Make a single keyframe on its position
Copy your mask path keyframe
Select your position keyframe
Paste, and you should see your object now moves along the path

To make a tail that follows the star:

Add a new shape layer with a single line in it
Make a keyframe on that line's path
Copy the path from your null
Paste it into your new shape layer.
Now you will have a line the same shape as your star's path.
Add a Trim Paths effect to your Line layer
Animate the 'End' control on the Trim Paths effect to get the path you need.

This set of scripts is excellent, and free. http://www.redefinery.com/ae/rd_scripts/
It includes scripts such as &quot;shapes to masks&quot; and &quot;masks to shape&quot;.
Highly recommended