They are basically the same, in the case of a school event.
Generally, the word "carnival" emphasizes the recreational aspects: fun, games, junk food. The word "fair" suggests a market, things being bought and sold... or an uplifting exhibition or exposition of something, as in a "World's Fair."
Historically, in the Middle Ages, a "fair" meant a temporary market for buying and selling things. Over time it came to mean any big, temporary exhibition, such as "World's Fair" or a school "Science Fair."
Historically and literally "carnival" is the celebration preceding the season of Lent, a forty-day period of fasting, particularly abstaining from meat. The "carn-" root means "meat," as "carnivore," a meat-eater. "Carnival" was the last chance to feast on meat (and get drunk, party, etc.)
(In that sense, the biggest carnival in the United States is not called a "carnival." In Brazil, Rio de Janeiro has a "carnival," while New Orleans in the United States has the "Mardi Gras." The French term reflects the French tradition and cultural heritage of the State of Louisiana).
"Carnival" also came to mean a traveling amusement show, featuring rides, performances, and junk food (much like a "circus.") A "carnival" might not feature meat, exactly, but it might well include cotton candy, fried dough, and deep-fried candy bars.
A school "carnival" suggests healthier food, but you might imagine parents selling home-baked cookies, and cooking and selling hot dogs on a grill. The food would be donated. The money collected might support the "PTA," a parents' organization that supports extra activities for children in the school.