Planes have segments called ailerons inserted in the wings and segments called rudders and elevators inserted respectively in the vertical fin and horizontal stabilizer. The pilot controls their position from the airplane cockpit. When the pilot moves them into the airstream, they cause the plane to react to air pressure. The pilot uses them to go right or left and also up and down.
These control surfaces work on the same principle as lift on a wing. They create a difference in air pressure to produce a force on the airplane in a desired direction.
Aileron - On Wing, contributes to Roll
Rudder - on Vertical Stabilizer (on tail), contributes to Yaw
Elevator - On Horizontal Stabilizer (on tail), contributes to Pitch
A combination of both Roll and Yaw is used to properly turn an aircraft in flight.