men
Males
Young boys played the role of women.
The female roles in Shakespeare's day were performed by Boy Players: young actors who had not yet reached puberty and therefore did not have masculine voices. Some of the Boy Players were Apprentice Actors, the modern equivalent would be Interns.
In Shakespeare's time, all female roles were played by young boys or men because women were not allowed to perform on stage. This was a common practice due to societal norms and restrictions at the time.
male
Men played every role in Shakespearean plays.
Women did not participate in Shakespearean plays. All roles, including female ones, were played by men.
Shakespeare's plays have been performed continually for most of the last 400 years, and for 350 of them (since 1660) the female parts in the plays have been played by actresses. Starting in the nineteenth century, a number of the male parts were played by actresses too. So you can tell that there have been hundreds of thousands of women who have played in Shakespeare's plays.
Every actor plays a role.
my mum
I believe back when they were first written the women roles where played by men because women were not allowed on stage
Shakespeare is not the only dramatist of his time to write plays with leading female roles. John Webster's plays The White Devil and The Duchess of Malfi also have strong female leads. The reason probably has to do with the quality of performers in the company. Shakespeare wrote specifically for the actors in his company, and clearly there were a number of talented boys for whom Shakespeare felt confident writing roles like Rosalind, Viola, Isabella and Helena.