The flap increases the camber of the wing for the portion of the wing to which it is attached. This increases the lift. It also increases the drag.
Credits - NASA