There are two types of gymnastics levels in the Junior Olympic (JO) Program: compulsory and optional.
Compulsory gymnastics consists of specific routines that the gymnast must learn exactly. This is done in gymnastics levels 1-5. USA gymnastics created the routines with the goal that the gymnasts have a strong gymnastics foundation before advancing to the optional levels. All of the skills in compulsory gymnastics are progressive. So after a gymnast learns the level 4 routine and masters it, the level 5 routine will build on the skills she has just mastered.
When competing in compulsory gymnastics, the downside is that if the gymnast performs all the skills perfectly, but messes up the specific routine, her score will be low. As a parent watching from the stands this can be confusing. A routine that looks much better can score much lower because of the very specific rules in compulsory gymnastics.
In compulsory gymnastics every child in the same level does the exact same routine, and in optional gymnastics they do different routines. In optional gymnastics there are a set of guidelines, or level requirements and routines are built around them. Each gymnast has her own music (on the Floor Exercise) and choreography. Her routine is built to show off her strengths.
Scores are based on how well she performs the skills in the routine, whether she has all the requirements and whether the overall routine is enjoyable to watch.
The Xcel Program was developed as a way for lower level gymnasts to compete optional routines.