It doesn't. There's a single tool for laying tracks that you can click or pull, but only in a straight line. I'm not sure how could it figure out what you want between two arbitrary points. There's always other tracks, terrain, something in the way.
Yes, that is the reason they mentioned the A* pathfinding algorithm - to solve that exact problem.