How Airplanes follow the Curvature of the Earth.
When pilots or the Flight Management Systemscommands the airplane to hold a certain altitude, the Autopilot and Fly-by-wire system make constantly adjustments in the Elevator Trim and Thrust setting to hold the commanded Pressure Altitude and Air Speeds. This is the way airplanes hold a certain pressure altitude and speed in reality and by this mechanism airplanes follow the curvature of the earth without intervention of the pilots.
But even when disengaging the Autopilot and the Fly-by-wire system, airplanes are designed in such a way that they naturally hold the pressure altitude they are trimmed for. The interactive physics simulation on this page shows how that works by displaying all forces and the velocity and acceleration vectors.
When the airplane changes altitude or when the vertical component of the wind speed changes, aerodynamic forces acting on the horizontal stabilizer at the tail of the arcraft emerge that create moments that pitch the airplane back into the wind direction. This gives the airplane natural stability.