I joined FlyerTalk to talk about airline bumping policies, and my first post is on flaps... oh well...
The basic formula for lift calculations is one-half the air density times the airspeed squared, times the lift coefficient, times the area of the object. So, for a given outside temperature and altitude (which give the density), to keep the same amount of lift while reducing the flight speed (e.g., because one wants to land) one needs to either increase wing area, or increase lift coefficient, or both.
If the flaps come out of the basic planform shape of the wing, as they do in most airliners, they increase wing area.
The deflection of the flaps on the trailing edge of the wing, and possibly of the slats on the leading edge, increases the lift coefficient. It does so primarily by increasing the curvature (or camber) of the airfoil (i.e., of the cross section of the wing).
The basic formula for drag calculations is the same as that for lift, but with drag coefficient instead of lift coefficient. Flaps also increase the drag coefficient, and by quite a bit, so they are not used in cruise flight.
As to the issue of not wanting to keep the flaps down because the airplane might accidentally take off, it's very unlikely, except in hurricane-like conditions. The forces on an airplane vary with the square of the speed. If the stall speed of an airplane is 120mph, a 40mph wind will generate only 11% of the minimum lift required to fly, and a 60mph only 25%.