What does a barometer measure and how?

it would measure the humiditie