Some ballets are put on by a company that has members who each have their own place already set for them, however, many ballets are put on by other groups that need to select the dancers, so an audition is held.
An audition is like a try-out for a sports team, but in the performing arts a try-out is called an audition. At the audition the dancers may do some exercises that are taught to them on the spot, or they may do a dance combination that is taught to them on the spot, or they may be told to come with something already prepared. Whatever the dancers do, there will be people watching them to pick the dancers best suited to the parts in the ballet. After the audition, (sometimes several months after the audition), the dancers will be told if they were selected to be in the production and if they were, what role(s) they will be playing.