This two algorithms use the same method - choose the best state and expand it by all possible methods, don't use state twice. The problem is - "which one is the best?". Dijksta algorithm solve concrete case of directed graph with positive edges weight. And it's easy to get the best vertex - it have smallest distance from initial vertex and adjacent to one of visited vertexes. So, dijkstra will find the shortest path on every input data.
A* can be used for any task, even when you can't say exactly what state is the best, for example I've solved 15-puzzle with it. In this case there are many table states which can be considered "best" so we choose the first. But found path isn't shortest.
I used obvious heuristic h(state) = manhattan distances between numbers and it final positions (in reverse, it is 0 when puzzle solved). g(state) = number of steps to achieve this state (as always). Priority is f(x) = h(x) + g(x). Of course, there can be much better estimation (mb it's better to don't touch 1 2 3 4 but stay shuffling 5 6 7 8 ... just as first thoughts).
So, when A* used for something (in STRIPS planning system, or simple pathfinding), it's possible to find very good h(x) for concrete case of graph, so perfomance can become really unexpected (for example, "jump point search" for uniform-cost grid map gives optimal soultion and much better perfomance than bfs-like steps + manhattan heuristic).
Anyway, determined solution still stay preffered. There is no need to solve Rubik's cube with A*, as you can solve it by usual algorithms (you can predict steps count then). And proved classic dijkstra is better than A* when you need to find short path in directed graph with positive edges (and it will be the shortest).