Because it was judged unseemly for women to perform in Elizabethan theatre, the female roles in Shakespeare's plays were performed by young boys. These boys were generally teenagers, no older than 20. They were often paid the least out of all the actors.
Young boys were chosen for female roles because of their feminine physiques. Their muscles hadn't fully developed yet and their voices were often high, which allowed them to speak in a convincingly effeminate manner.
The boy actors, as they were commonly referred, were apprenticed to master actors. They wore make-up, wigs and dressed in elaborate costumes that were reflective of female style at the time.