Pump and compressor are two types of machines or devices used in changing the mechanical energy of the engine to the material being compressed. However, there are some differences between them. A pump is a machine for compressing or moving a liquid or gas. It is also used as a machine for dispensing liquid or gas. A compressor, on the other hand, is used for compressing gas only.
It can't be used to compress liquids because they are tough to compress. When you use a pump, the kinetic energy of the fluid is increased, while when you use a compressor, the potential power of the compressed air or gas is increased. And also, there must be a change in pressure when you use a compressor, whereas there's no change in pressure with a pump. Another difference is that a compressor has storage capacity, whereas a pump does not have. However, a compressor is more expensive than a pump