Fire crews responded to the school at 1200 E. Alondra Blvd. at about 1:15 p.m. and quickly had the blaze under control.
"We have had a great response from the L.A. County Sheriff's Department, our Compton School Police, and the L.A. County Fire Department, as well as fire departments from Compton, Vernon, and Downey," the Compton Unified School District said in a statement.
All students and staff were evacuated to a nearby store, according to the district. No injuries were reported.
The cause of the fire has not been determined.