Air compressor is a type of a machine, with various complexities which has the main task to compress a given volume of air in a smaller space than natural state (or atmospheric one).
Take for instance the air in the auto tires which is compressed to reach more or less than 2 (two) atmospheric pressures. That's possible by compressing more than twice the air volume needed to fill the tire at normal (atmospheric) pressure.
There are numerous types of compressor as many as ways to do it:
Radial - the pistons are moving on the radius of an imaginary wheel or more pistons are tide and moved from the same point.
This can be the cylinders of internal combustion engines from the cars.
Axial - the pistons are actuated by a disc positioned in a certain angle with the pistons (which are also arranged in a barrel as bullets from a barrel-gun or "pistol" type barrel, and the disc is touching one by one an releaseing the previous one). The barrel is rotating by its rotating axis and the disc is fixed.
There are some Radial compressors with barrel moving de-centered this time, in a cilinder (or pipe type) casing and the pistons are compressed against the wall of the casing and the barrel one at the time an relaxed on the other side. The space of the cilinder inside the barrel left when "relaxed" is filled with air.
The first tipe of Radial mentioned above (engine like compressors) need valves.
The axial and radial barrel type compressors do not need such valves because they are rotating the pistons from a zone low pressure zone(atmospheric one) to a high --or very high, up to >1000 atm--pressure zone.The chambers(zones) being isolated with respect to each other and to atmospheric pressure--especially the high pressure one, they have only an inlet-outlet comunicating with the corespondant zone.