A barometer consist of a long glass tube and a liquid reservoir, usually mecury.
The tube is first submerged in the reservoir, and completely filled with the liquid in the reservoir.
Then, the tube is held inverted to a vertical position, with the mouth of the tube still in the liquid reservoir, and a pocket of vacuum above the liquid column inside the tube.
The atmospheric pressure exerts a force on the surface of the liquid reservoir, pushing the liquid up the tube. The pressure of the liquid column in the tube will be equal to the atmospheric pressure.