Air compressor is any device used to compress air. A common type works on the same principle as a pump. It has a piston that moves back and forth within a hollow cylinder, compressing the air and forcing it into a closed chamber. Pipes or hoses connected to the chamber channel the air to tools and other devices that run on compressed air. Such devices do many important jobs. Trains and heavy road vehicles have air compressors that supply the air used to power their brakes (see Brake).