The theories on the origin of flight have been debated for over a century.  It is one of the most challenging aspects of evolutionary biologyThere are two major conflicting theories: (1) The "Ground Up" or cursorial theory and (2) "Trees Down" or arboreal theory.  Each theory relies upon speculation about the paleoecology and functional adaptation of the proavians. 
The Cursorial Theory
This theory proposes that flight evolved in running bipeds through a seriesof short jumps.  As the jumps became more and more extended, the wingswere used for balance and propulsion eventually resulting in flight withouta gliding intermediate.  There are two models that attempt to explain this theory.
The Insect Net
It is proposed that obligatory bipedalism allowed free movement of the forearms, making them available for catching prey.  As the feathers enlargedover time it would make them a better tool for batting and catching insects, bychasing and swatting them with their wings.  As the forelimb enlarged, themotion would turn from swatting into actual flapping flight. 
Criticisms
The motion used to catch insects is different from the motion of a flight stroke.
Wings and feathers would be damaged for flight if used for batting prey.
To catch prey, air holes would need to be present (like a fly swatter) to let
air pass.  Archaeopteryx's wings did not have air holes, thus is would be
unable to catch insects in this manner.Instability and loss of balance with "insect nets".
The Fluttering Model
It is proposed that the proavians used their jaws to catch prey but employed their wings as bilateral stabilizers during a jump into the air.  It is suggested thatthe rudimentary wings were effective for balance while running, jumping, and turning, until capable to take off at high speed.  The extension of the forelimbswould cause minute increments of lift, enabling them to jump further and capturemore prey.  The motion of the forelimbs for stablilization would mimic the flightstroke of a bird.  The  increase in airfoils would allow greater and greater lift leading to powered flight. 
Criticisms
Outstretched wings would increase drag and slow down locomotion.
There is question as to why selection would favor flapping wings fora terrestrial foraging animal. 
Flight at low speed and close to the ground is more sophisticated and complexthan flight at high speed.  
Foraging in flight implies instability and a great degree of maneuverability requiring very fine coordination.  It is unlikely a fine control developed in jumping proavians with a long stabilizing tail.
The Arboreal Theory
This theory proposes that a climbing proavian started to glide betweentrees eventually leading to wing strokes as the precusor to flight.  The rudimentary feathers that developed from scales on arboreal reptilian birdsacted like a parachute slowing the descent as the animals leaped from branchto branch, hence controlling their jumps and falls.  It is suggested that proavians were ground foragers and used trees to nest, hide,and roost.  The proavians would climb trees through the use of manual  andpedal claws that are evident in the fossil record.  As the jumps became a greater distance, an unspecialized glide with a steep angle would develop.  Gliding wouldincrease distance, maneuverability, and slow down landing.  Once gliding becamespecialized then flapping would begin.  During landing they would flap their wingsto slow the decent.  This motion would eventually give rise to active flight.
Criticisms
Proponents of the cursorial theory claim that gliders were evolutionary
dead end.
Climbing would damage feathers (this has been disregarded since the
extant Hoatzin chick can climb trees without damaging their wings.
Content courtesy of: https://www.bsu.edu/web/00cyfisher/