Thanks for the question, duk0h! It depends on your exact use case, but most likely you’re going to want to look at the Google Maps Directions API. You can find more info at:
It’s also possible to create your own routing on a custom map, if you have sufficient and accurate location data. You can then use the A* algorithm, an extension of Dijkstra’s algorithm.