Airplanes with a Mixture control have internal combustion engines (like automobiles and lawnmowers, but not like jets). An internal combustion engine runs on fuel (avgas, petrol, butane, alcohol, whatever hydrocarbon you pick...) mixed with air.
The ratio that the mixture of fuel and air is set to is important for several reasons: cost of fuel, engine cooling, avoiding carbon buildup in the engine, how smooth the engine runs, how much power the engine produces, etc.
The ratio is based on the number of molecules of fuel and the number of molecules of oxygen. Air is approximately 20% oxygen no matter if at sea level or 30,000 feet.
But at sea level the air is compressed more than at 30,000 feet. As the airplane, or you, go up in altitude the air gets "thinner", or less dense. Less dense means that the air is not as compressed. For some volume of air, 1 cubic foot for example, higher pressure air will have more air molecules than lower pressure air. Since air is 20% oxygen, fewer air molecules also means fewer oxygen molecules.
The engine performs best when the air/fuel mixture ratio stays "in balance", or as close to ideal as possible. As the engine is running is pulls air into the engine, but the amount of air is based on the volume of air, not the number of molecules of air. As the pressure decreases, so do the number of molecules. As the aircraft climbs into thinner and thinner air the mixture must be "leaned out", where the volume of fuel and the fuel molecules is reduced, to compensate for the fewer number of oxygen molecules being pulled into the engine.
As the aircraft descends into "thicker" air, the number of oxygen molecules increase again, so the mixture must again be adjusted by increasing the number of fuel molecules to keep the air molecules and fuel molecules at the correct ratio.