Interesting questions you have.

Q) Did Ravana actually have 10 heads or is it an allegorical meaning ?
A) Ravana was having 10 heads. Though they were interpreted as 10 indriyas or organs of the body like sensory and vital organs, yet he was really also was having them.

Q) Which Treta Yuga did it take place ? I have heard it was in the 24th treta yuga.
A) 24th trethayuga was the rama’s period. Right you are.

Q) Are Vanaaras, Rakshashas, etc are humans with different qualities or they actually different living entities?
A) Vanaras were having ability to have their own chosen from. Ka:maru:pa Dha:rana: sakthi. So they can take any form they want.