The Timelines panel tracks the movement of a layer from one point to another, frame by frame, and it paces the movement of an object so that the frame-to-frame transitions are smooth.
If there are only two points in a timeline, the line in which the layer moves must be a straight one. You can add a third point to a timeline to make a layer move in an arc, or you can add points for multiple positions or actions.