Probably using an orthogonal graph drawing algorithm. Other possibilities include using a force-based algorithm before manually adjusting the tracks.