Consider these two states and their heuristics:
The state on the right is better because the 1 and 8 tiles are closer to their destinations.
A more informed heuristic is the sum of the "Manhattan distances" that the tiles are out of place.