Dijkstra's algorithm is used to find the shortest path between a source node and all other nodes in a graph. It works by maintaining two sets - S of nodes whose shortest paths have been determined, and V-S of remaining nodes. It initializes distances and predecessors, then iteratively relaxes edges of the closest node in V-S until V-S is empty, determining the shortest path to each node. The algorithm runs in O(|E| + |V|)log|V|) time.