As per the Boyle' law , for a given amount of gas at a fixed temperature, the pressure of the gas increases with decrease in its volume.
To understand Boyle's law, it helps to visualize the behavior of gas particles (or molecules) in an enclosed space. In a closed container, individual molecules are constantly hitting and bouncing off the container walls. Each time a gas molecule bounces, it imparts a force on the wall. In a flexible container such as a balloon, the force of the molecules hitting the inside of the balloon hold the balloon inflated. The force of each impact is small, but the sheer number of collisions create enough force to keep the balloon open.
If the volume decreases, the molecules encounter the container walls more often. This is true even though the speed (temperature) of the individual molecules has not changed. An increased number of collisions equates to higher pressure.