Cayley, if memory serves, was the first person to build a successful heavier than air flying machine. Essentially, he invented the hang glider. He was the first one to identify the four forces that act on an aircraft- lift, gravity, thrust and drag. Personally, I don't think he gets enough credit for the pioneering work he did.
Otto Lilienthal and Octave Chanute were the next, advancing gliders into a far more practical design than what Cayley had. Chanute was especially influential, inventing the biplane wing that would dominate aviation until after World War I, and collecting and publishing all extant scientific data on aviation available at the end of the 19th century. Chanute was one of those dreamers who wanted to see mankind fly, rather than be the one to patent the airplane and make money off of it. As a result, he shared his findings freely with anyone who was interested, including Orville and Wilbur Wright. The help he provided the Wrights was invaluable, and saved them years of research.
The race to build the first practical airplane really came down to Samuel Pierpont Langley and the Wright brothers. Early on, the Wrights, using Chanute's data, realized their prototype gliders were not performing how the numbers predicted they would. They built a wind tunnel and conducted their own experiments, discovered Chanute's data on aerodynamic lift was flawed, and used the new data to redesign their gliders. Once they had the lift they were looking for, they turned to the issue of control. They were the first to identify the concept of roll, pitch and yaw to steer and airplane, and developed the idea that an airplane needed to be banked, not just yawed, to turn. As a result, the invented a system of warping the wings to do this. They also designed their early aircraft with anhedral wings, meaning the tips were lower than the center. This made the airplane easier to roll, and as a result, easier to steer. The downside was that it also made the airplane highly unstable. However, they had an aircraft they knew would fly, and knew they could steer, and by the end of 1903 they were able to put an engine powering two contrarotating propellers on their craft, and launch it as the first practical airplane. They really do deserve a large portion of the credit due to the scientific manner in which they studied, experimented, and solved the problems Cayley, Lilienthal and Chanute never could. That being said, the earlier pioneers' work was a huge stepping stone for them.
Langley managed to launch unmanned powered aircraft on test flights before the Wrights, but his manned aerodromes crashed on takeoff, and once the Wrights beat him into the air with a practical plane, he gave up further development.
A latecomer to the party was Glenn Curtiss. He replaced the Wrights wing-warping system with moveable flaps (ailerons) mounted on rigid wings. This allowed the wings to be stronger, permitting the construction of bigger, faster, more maneuverable aircraft. He also discovered that planes performed better with the elevators and rudder mounted behind the wing. The Wright flyers had the elevator in front of the wing. Ailerons and the tail-mounted elevator are still used in the majority of aircraft today. Curtis also made a few refinement's to Langley's aerodrome design, and managed to build a working version of it.