Various planes have different types of flaps designed to do different things. But the effect in all planes is the same, in varying degrees. Engaging "flaps" brings part of the trailing edge of the wing down. In any plane, this increases drag, as it would have to. It also increases lift.
In most planes, this is used for landing. As you approach the airfield, and your speed drops into the range where control becomes difficult and you approach stall, dropping the flaps will help slow you down while giving you extra lift to stay in the air and maintain control until you are on the ground.
In other planes, designed with "combat flaps", the flaps are actually intended to be used in a fight to tighten the turns and help maintain control of the aircraft in those turns. They engage at the first "notch" in relatively shallow degrees, to minimize drag and slightly increase lift. Minimized or not, they still produce extra drag.
In AH, as in other sims, you will see people use the first kind to do the job of the second kind, with various degrees of success. You can definitely use them in loops or Immelmans to help "get you over the top", although if you are performing an Immelman and you are that slow at the top, it rather defeats the purpose and leaves you a sitting target.