An air compressor is a machine that uses electricity or gas to suck air in and squeeze it really tight. It's kind of like blowing up a balloon, but on a much bigger scale.
When you turn on the air compressor, it uses a motor to spin a big metal thing called a piston. The piston sucks in air from the atmosphere (the air around us), and then squeezes it down into a small space called a tank.
Once the air is in the tank, it's under high pressure. This means that there's a lot of air squished into a small area, and it's ready to be used for lots of different things.
Some people use air compressors to power tools, like drills, sanders or spray guns. Other people use them to inflate tires or blow up air mattresses.
Overall, an air compressor is a pretty nifty machine that takes air from the environment, compresses it, and then helps power a bunch of different things.