A mercury barometer has a glass tube that contains mercury and that sits upside down on a container called a reservoir. This barometer works by the level of the mercury in the glass being balanced with the amount of pressure in the atmosphere. It is designed to act just like a set of scales, so if the mercury weight is less than the atmospheric pressure, the level of the mercury in the glass will rise.
The pressure of the atmosphere is the weight of the air and this helps experts and weather enthusiasts predict certain weather conditions. As such, the level of mercury will either move up or down the glass tube depending on the air pressure around it.
These days, a digital barometer is usually used by weather stations, although mercury versions are usually the most readily available to the everyday weather enthusiast.
A digital barometer works by using electrical charges to measure the air pressure. This helps weather stations to predict changes in the weather in a more accurate and timely fashion. For example, if the atmospheric pressure is slowly rising on the digital barometer scale this will predict more settled weather. On the other hand, if the pressure suddenly drops and continues to drop over a period of a few hours, this will usually predict an impending storm.