In an airplane of sufficient complexity, the autopilot will be controlled by a computer (ussually refered to as an FMS {Flight Management System}).
You can program a set of desired waypoints, along with a desired time of arrival, and the plane will fly the desired route with high accuracy.
(auto-throttle system is also required)