This type of apparatus was used by Robert Boyle in order to study the behavior of gases. In (a) the pressure exerted on the gas by the mercury added to the tube is equal to the atmospheric pressure. In (b) an increase in pressure due to the addition of more mercury results in a decrease in the volume of the gas and in unequal levels of mercury in the tube. You can then see that in (c) and in (d), the more mercury that is added (which creates more pressure added) creates a decrease in the volume of the gas.