You use hyphens when the words are used before a noun to describe the noun. So yes, hyphens here:
* My three-year-old niece likes cats.
* The twenty-thousand-dollar prize belonged to his sister.
* I have a two-year-old cat and an eleven-year-old cat.
But not here:
* My niece is three years old and she likes cats.
* The prize, which was twenty thousand dollars, belonged to his sister.
* I have two cats. One cat is two years old and the other is eleven years old.
Also notice: * three-YEAR-old niece
* My niece is three YEARS old
English also uses hyphens in certain numbers (20+, 30+, etc.) regardless of where the number occurs in the sentence. So... twenty-one, twenty-two, twenty-three, etc...
* My twenty-two-year-old sister is getting married next week.
* My sister, who is twenty-two years old, is getting married next week.
Hope that helps!