There are several sources on how to find the shortest path between two points on a map. I believe the most common known (and well documented) is the Dijkstra's algorithm. This algorithm is based on weighted graphs where the distance between two points is given in the graph. I will not go further into this algorithm in this text but I might add that it is possible to generalize and simplify the algorithm when dealing with normal tile based strategy games (hex based also). In most of the cases we deal with, the distance between two tiles is constant (1 unit). The algorithm can be optimized for quicker evaluation on this basis.
Take a look at Chris Palmer's page for an explanation of the Dijkstra's algorithm.
The algorithm I'm going to explain is based heavily on Dijkstra's algorithm with our assumptions on distance between tiles. I've heard about "A-Star" algorithm and it originally thought this was the same one in a different presentation. I've gotten feedback that this is not quite true and the "A-Star" is supposed to be faster also.
Please look at this contribution with source code from k_burge@alcor.concordia.ca about the A* algorithm.
And also this link from Patrick Feuser http://www.das-netz.de/privat/pat/a-star.htm.