The purpose of a manometer is to measure the pressure of a contained gas. It consists of a U-shaped glass tube with one end open to the atmosphere, mercury in the bottom of the U and the gas to be measured in the other side of the U-tube. The gas is added then the glass tube is sealed on the gas side so the gas is trapped on one side of the mercury. (See open-end manometer in diagram). The liquid mercury is equalized in the two sides of the tube at atmospheric pressure. When the gas is added, it will exert pressure on the mercury on the other side. If the pressure of the gas is equal to atmospheric pressure the mercury will remain at the same levels on both sides. If the gas is exerting more pressure on the mercury than the atmosphere exerts, it will cause the mercury to be higher on the atmosphere side than on the sealed side. The difference between the two heights tells you how much higher the gas pressure is than atmospheric pressure. Adding the difference to the atmospheric pressure (this is usually measured in millimeters of mercury) will give the gas pressure. If the gas is at a pressure below that of the atmosphere then the mercury will be lower on the gas side and the difference in height is subtracted from atmospheric pressure to get the gas pressure.
There is also a type of manometer, pictured as well in the diagram, that has gas sealed on one side of the U-tube, mercury in the middle of the U and the other side evacuated and sealed. Since there is no air pressure in the evacuated side the pressure of the gas is given by the difference between the height of mercury on the two sides.