Why does Air have Pressure?

Air has pressure if you cram it into a small place, because it wants back out. It’s the same with water. If you put it in a small pipe and force more water behind it, it pushes out with pressure.