How are flaps controlled?
Flaps have different actuation mechanisms from primary flight controls. Flaps deflection brings a shift of pitching moment with it, and it is done slowly to give the pilot time to adjust the aerodynamic trim. Usually with electrical screwjacks, with a fine pitch that stops the forces on the flaps from feeding back into the motors.

Yes flipping the switch switches the electric motors on. Most jetliners use Fowler flaps, which ride out on their little rails attached to the wing, and clad with an aerodynamic fairing at the trailing edge. This picture (source) shows the rails, flaps, and screwjacks when completely extended.