Do I need to have different guitars to play different styles of music?

Yes and no. First of all, you can start learning virtually any style of music on any style of guitar. However, to get a true idiomatic sound in a particular style you do need to have different guitars. For example Classical Guitar is played on a nylon string guitar (and with right hand fingernails). Jazz Guitar sounds best on a hollow body guitar. Blues, Rock and Country Guitar are usually done on solid body guitars. After a student acquires basic proficiency in multiple areas and proves to be serious, then it is time to consider a specific style of guitar that is appropriate for the style they wish to focus on.