What is the difference between an aileron and a flap?
An Aileron is used to control the roll of an aircraft. Ailerons are found on the trailing edge of the wing, typically closer to the wing tip.
Ailerons will move in opposite directions to each other, as one goes up, the other goes down.

Flaps are used to increase the amount of lift that a wing produces by increasing the camber and surface area of the wing. Typically they are located near the root of the wing. Flaps on each wing are moved together, both extend and retract at the same rate.

Flaps are generally more complex depending on type. The basic flaps will just pivot down from the lower edge of the wing. Modern airliners have a fowler flap which both pivots down and extends back from the lower edge of the wing.