You can click the trains to begin drawing a route. Click them again to confirm the route once you’ve made your loop. You’ll need to click a few times in between to make sure the route is just as you wanted.