Why or how do flaps increase the curvature of the wing? Do they alter the curvature of the upper surface of the wing?
Flaps change both the camber of a wing as well as its chord line and angle of attack. All the following images were taken from this article.
You can see the camber line here in a retracted scenario:
And here in an extended scenario:
As for the why, flaps are generally used to allow you to slow an aircraft down at a give pitch angle. This allows the pilot to pitch the aircraft down without an increase in speed. Generally a pitch down (given no other things are changed) will result in an increase in speed.
All of this is a bit of an over generalization as there are many types of flaps and it's worth looking into the different types and how they operate.