Hi,
As FLYBOYJ rightly commented, it's a pretty broad question. Anyway, here's a little more input in a very simplistic sense.
A primary purpose of all flap is to increase the wings' amount of lift. i.e. it's ability to fly. In the take-off and landing phase it is particularly useful in allowing flight at lower speeds, leading to shorter take off and landing distances. (Always useful
)
A common comeback is that,
"If they increase lift, why not fly with flaps extended all of the time??" The reason being is that they also cause resistance to the airflow,or 'drag', which is not ideal for most phases of flight. For take-off and landing the trade off is acceptable.
FLYBOYJ is on the money about landing flap normally having a greater degree of extension relative to take off flap settings, which is often zero on light aircraft.
Also, on more complex wings take-off 'flaps' can be found on the front, or 'leading edge', of the wings. These 'leading edge devices' can be slats, flaps, etc. Also used in the landing phase, for take off they are usually extended in unison with the take-off setting of the 'trailing edge' flaps at the rear of the wing. Once again they are retracted after take off.
The photo below is not the best, but it was all I had at hand. It shows the extension of 'lift devices' on both the leading and trailing edges of the wing on this Boeing 737-300)
As mentioned, this subject can get very complex, so I've skirted the edges.I hope it helps.
Cheers
Owen