How do I leave a "trail" in the path of the object being moved?

For example, I move an object across the screen and I want a line drawn to mark its path. Can curves be drawn, in addition to straight lines?