Classrooms are a place to send prisoners for Educational Programs. They are used automatically at the scheduled times by interested prisoners (or guards).
have 1 guard there just in case
The room serves as a place for your Prisoners to come and learn. An externally hired Teacher (i.e. not a member of staff ) will come in (automatically) and teach two courses:
The Foundation Education Program is 10 sessions long, and the General Education Program is 20 sessions long, and (when successfully completed) represent a significant boost to the Prisoner's Reform section. This, in turn, will lower their Re-Offending Likelihood and give your prison a better rating when they get out. Passing the Foundation Education program will authorize a prisoner to work in the Library sorting books.
Teachers will not come if you do not have enough scheduled time for a class. As noted on the program explanations they require work time in the regime (3 hours each) and to run more than one program at a time you will need more than one classroom. The teachers are paid as part of the cost of running the program.
The class room is also used for tazer rollout. Any non-armed guards wishing to carry a tazer must first complete a training course. The tazer rollout classes are taught by the Chief (which must be hired and the appropriate research completed).
If you have completed research into micromanagement you can adjust scheduled class times within work hours available and assign them to specific class rooms around the prison (if you have more than one).
Tazer training can happen outside of prisoner work hours (since it only involves guards and the Chief) but should be placed carefully within the regime to not take away too many guards during busy prisoner hours. (Tip: try scheduling guard training early before most prisoners are even awake and have it complete before new prisoners arrive for the day and need to be checked in)
Note: Teachers for prisoner classes will show up automatically at scheduled times (they are noted in game as external hires, not something you hire directly). Also note: The chief's office should not be too extremely far away from the class room he is scheduled to use or the class may not be completed before he is "tired" and marked for resting. (something to consider if you never see guard training completing)
Guards and prisoners can attempt to retake classes they fail if they choose to. You have no direct control over whether they are interested in taking the class again if they fail. The number of interested people in a particular class is noted on the program schedule page.
Tip: prisoners get nervous around guards and their presence increases the failure rate of class training programs. It can be beneficial to micromanage guard patrol routes to not go through class rooms during actual class time (that includes walking past any windows that you may have placed in the class room). However, prisoners sometimes get rowdy in class so resuming guard patrol immediately upon class completion may save the life of a teacher if prisoners are getting out of control (this is one of the trickiest but best uses of micromanagement for guard patrols)
Grant - Education Reform Program Edit
See main article on Education Reform Program
In the Grant, it requires the building of a Classroom and at least twenty desks. If one were to place all of the desks in one room, they would have to exceed the minimum size of the room. This is usually not an issue. It's also allowed to simply build 2 classrooms and split the desks between them. This leads to better efficiency later in the game anyway so that you can run both types of classes at the same time by having 2 classrooms.
The grants requirement is simply (at least) 1 classroom and a total of 20 desks, regardless of how many rooms those desks are spread between.