Several passages in Scripture tell us that G-d does not change (e.g., Malachi 3:6, James 1:17), but verses suggest that G-d does change His mind (e.g., Jeremiah 18:8, Amos 7:3,6).
How are we to understand these contradictory passages?
Consider these parables:
Dessert
A woman had a son who did not like spinach. (Doesn't every parent have such a child?) :)
The mother told the son that if he ate the spinach on his plate along with the rest of his meal, he could have dessert.
The son refused to eat the spinach and so did not get dessert.
Week after week, this happened on the nights when spinach was served.
One night the son ate the spinach with his meal (making faces the whole time) and was able to have dessert.
Neither on that night nor all the nights before had the mother changed her mind.
The Path
A man went to the beach on a hot summer day and noticed two paths from the street to the surf. One was a sandy trail that appeared to be highly traveled; the other was a shade-covered boardwalk that seemed new but unused.
Figuring the crowd knew best, the man set off on the sandy trail.
The sun-baked sand burned his bare feet, and he cried out in pain after several yards. Then, finally, he turned back and returned to the street. Once he had switched to the boardwalk, the shade kept the path from growing too hot, and he made it comfortably to the beach.
One path was painfully hot, and the other was comfortable, but the sun had never stopped shining.
The Lesson
In both of these examples, the conditions/environment did not change. However, the individuals interacting with the conditions/environment changed their behavior and received a different response. Similarly, when we conform our behavior to G-d's will, we do not receive the correction or penalties that would have resulted from continued transgression.
G-d didn't change His mind: we changed our behavior, and the consequences were different.