A* uses f(n) = g(n) + h(n). If the heuristic h is admissible (never overestimates) and consistent, A* is optimal and explores fewer nodes than Dijkstra. If h overestimates, optimality is not guaranteed. With h = 0, A* reduces to Dijkstra.