When were schools invented?

The concept of grouping students together in a centralized location for learning has existed since at least Classical antiquity. Formal schools have existed at least since ancient Greece (academy), ancient India (gurukul) and ancient China.

The term school is from the Latin, but the Romans did not invent the concept of formal education.

The Romans invented schools. This was during the Roman Empire's rule. The name was formally known as "scola" which was Latin for "school".