Both...
It will re-route to get you back to the original course, or it may also re-calculate a new route to the destination. It really depends on how far you've strayed off course.