Wing flaps are used to significantly change the wing (size/shape/aerodynamics) so that it flies better at the slower speeds associated with taking off & landing. With rare exceptions (fly-by-wire F/A-18, for example), flaps are set in fixed positions and aren't moved continuously during flight. For cruise flight, including everything from about a minute or two after takeoff until a few minutes before landing, the flaps are in the fixed "up" (i.e. fully retracted) position.
The primary flight controls, the ailerons, elevators, and (to a somewhat lesser extent) rudder, move dynamically throughout the flight, controlled by the pilot or the autopilot, to maintain the desired attitude. If the aircraft starts to climb (when level flight is desired), the pilot applies forward pressure on the yoke, lowering the elevator very slightly, increasing lift on the tail and lowering the nose by the small amount needed to arrest the undesired climb.
These small corrections continue throughout the entire flight to keep, and restore, the aircraft's attitude to the desired attitude. Much like the small corrections required to keep an automobile centered in its lane while driving, even as curves in the road, winds, variable road surfaces, and the like tend to cause the car to drift left & right.
Edit: Flaps have limitations regarding how fast the aircraft is allowed to be flying when they're extended, since putting them out at high speed can impose stress on the flaps & the associated hardware that connects them to the wings. For airliners that cruise high enough that cruise speeds are measured in high Mach numbers (i.e flying around at a large fraction of the speed of sound, where transonic airflows can have effects on the flight controls), there can also be limitations on how high you're allowed to extend flaps. In the 737, those limits are 250 knots and 20,000' for the initial extension, and around 168 knots for full flaps. So in typical cruise flight, you would be out of parameters to extend them.
Happily, at cruise speeds, you don't need to extend them, since you're well outside of the low-speed regime where they are helpful.