Barometers are instruments that measure atmospheric pressure, and altimeters are instruments that measure altitude of any place or of flying objects like aircrafts. Altimeters are of two types - pressure altimeters and radar altimeters. The pressure altimeters work on the principle that atmospheric pressure of the air decreases as the altitude decreases. These type of altimeters are essentially very sensitive barometers that are graduated to indicate altitude corresponding to different atmospheric pressure rather than pressure.
Thus it is not just that barometers can be used as altimeters, but many of the altimeters are actually barometers. It is also possible to use ordinary barometers as altimeters by reading out the atmospheric pressure from the barometer and then determining the altitude corresponding to the it.
A barometer is used to measure the atmspheric pressure of place. An altimeter shows the altitude of a place. The atmospheric pressure decreases as the altitude increase. So it is a known fact that the altitude and the height of the mercury in a barometer are closely related by the decresse of about 1 centimeter for every 120 meter raise in altitude or from the sea level. So, if your at a height of 1500 meter above the sea level, there is a decrease of 1500/120 = 12.5 cm in mercury level in barometer.
This indicates that for a decrease of x centimeter of mercury level, the altitude of the place must be = 120x meter.This shows that a barometer could be used to determine the alitude of aplace.