Compulsory Gymnastics are 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 gymnastics routine and masters it, the Level 5 routine will build on the skills she has just mastered.
The downside when competing in Compulsory Gymnastics 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.