Most of what we know about the Cloisters comes from the series 9 finale Hell Bent. Obviously, spoilers ahead, with many quotes from this episode (all emphasis mine).
The Cloisters are a hellish place below the main city of Gallifrey.
OHILA: The Cloisters. Where else would he run, except into the greatest danger on Gallifrey. The hell of the Time Lords.
The Cloister Wraiths are the ghosts of Time Lords.
DOCTOR: The Cloister Wraiths. Sliders, we used to call them. They guard the Matrix. We're safe in here.
DOCTOR: When Time Lords die, their minds are uploaded to a thing called the Matrix. This structure, it's like a living computer. [...] The Sliders, they're just like the guard dogs, the firewall. Projections from inside the Matrix itself. The dead, manning the battlements.
CLARA: Was I supposed to understand any of that?
DOCTOR: The Time Lords have got a big computer made of ghosts, in a crypt, guarded by more ghosts.
The Cloisters also have bells, which must be related to the TARDIS's Cloister Bell in some unknown way:
RASSILON: Are all the bells ringing? The whole Cloister?
DOCTOR: It [the Matrix] can predict the future, generate prophecies out of algorithms, ring the Cloister bells in the event of impending catastrophe.
As for your second query about the Time Lords and the class system on Gallifrey, it's already been covered very well by @Richard here
, making this part of your original question a duplicate.