The Credit of Inventing the successful airplane goes to Orville and  Wilbur. They were two Americans who also known as Wright brothers. They also have the record of first controlled, powered and sustained heavier-than-air human flight, on December 17, 1903.
But How this idea of inventing the airplane came to their mind ? Let see
The brothers observed and thought, how birds can fly.  They noticed when birds soared into the wind, the air flowing over the curved surface of their wings created lift. Birds change the shape of their wings and tail to turn. This observation hit their mind and they believed that they could use this technique of birds in their invention of making things fly.

The brothers' fundamental breakthrough was their invention of three-axis control, which enabled the pilot to steer the aircraft effectively and to maintain its equilibrium. This method became standard and remains standard on fixed-wing aircraft of all kinds Their first U.S. patent, 821,393, did not claim invention of a flying machine, but rather, the invention of a system of aerodynamic control that manipulated a flying machine's surfaces.

Orville Wright&flyer1909

The Wright brothers, Orville (August 19, 1871 – January 30, 1948) and Wilbur (April 16, 1867 – May 30, 1912) were the son of Bishop Milton Wright (1828-1917) and Susan Catherine (Koerner) Wright (1831-1889). The brothers never married. Wilbur Wright died at age 45 of typhoid. Orville Wright died of a heart attack at age 77.