To make an airplane fly at a constant speed, we need all the forces that apply on it to be even.
There are four forces: Weight, Lift, Drag and Thrust.
Weight works all the time, directed to the center of the earth. To contradict that, we have to generate lift.
To move forward we need thrust. Flying against the wind creates drag, which slows the airplane down.
Lift - Lift is gained because of air pressure. By having high pressure under the wings and low pressure above them, we get a force, pulling the airplane up. This is the result of the Bernoulli Law – the faster the air moves, the lower the pressure it makes to the sides (in perpendicular to the direction of its movement).