Compressors are similar to pumps: both increase the pressure on a fluid and both can transport the fluid through a pipe. As gases are compressible, the compressor also reduces the volume of a gas. Liquids are relatively incompressible; while some can be compressed, the main action of a pump is to pressurize and transport liquids.
Many compressors can be staged, that is, the fluid is compressed several times in steps or stages, to increase discharge pressure. Often, the second stage is physically smaller than the primary stage, to accommodate the already compressed gas without reducing its pressure. Each stage further compresses the gas and increases its pressure and also temperature (if intercooling between stages is not used).