How to use OpenStreetMap to get distance between two points
OpenStreetMap does not have their own routing algorithm.
On the OpenStreetMap wiki, there's a list of software libraries that perform routing. The Intermodal Transport Routing Information System is written in C#.
You can look up CloudMade for APIs to get travel distances for OpenStreetMap.