HSBC interview question

How does a humidity sensor measure Humidity?