Create a small solid and animate it moving around in the comp. Duplicate the layer and remove the keyframes (by clicking the Position stopwatch) from the top copy. Also on the top copy, add the following expression to the Position property:
Duplicate the top copy three times, play the comp and you'll see four layers following the original layer, like a trail. This works because each layer is referring to the position property of the layer below it-layer(thisLayer,+1).position. But after the word position, the phrase valueAtTime(time “.5) means set this layer's position to the position of where the layer below it was half a second ago. Try playing with the .5 to change how close the layers follow each other. If you change it to 2, the layers will be further apart. If you change it to .1, they'll be very close together.