The best 5 cards win and any combination of community and hole cards can be used to make the hand. You both have two pair, Queens and 9s but the villain has a better kicker which is the A.
Your hand is QQ998 and the villain has QQ99A which is better.