What does it mean to doff a hat?

Can you answer this question?