You can draw a path for the motion of a selected layer using Motion Sketch, which records the position of the layer and the speed at which you draw. As you draw, a Position keyframe is generated at each frame.
Motion Sketch does not affect keyframes that you have set for other properties. For example, if you set Rotation keyframes for an image of a ball, you can use Motion Sketch to generate Position keyframes, so that the ball appears to roll along the path you created.