Use film and other literature to inspire you--in particular this song Do you Want to Build a Snow Man. The character is bored. There's empty hallways, but time passes and that's communicated in a number of different ways.
In literature Harry Potter is a really good example--boredom is handled well throughout his novels, you can look to any description of the History of Magic class for that. I believe that's Professor Binns...
Also, even though there's a unique framing device at work, The Princess Bride novel just has all sorts of fun describing boring stuff...
Here's a little Douglas Adams for you:
In the end, it was the Sunday afternoons he couldn't cope with, and that terrible listlessness which starts to set in at about 2:55, when you know that you've had all the baths you can usefully have that day, that however hard you stare at any given paragraph in the papers you will never actually read it, or use the revolutionary new pruning technique it describes, and that as you stare at the clock the hands will move relentlessly on to four o'clock, and you will enter the long dark teatime of the soul.
I think Raymond Chandler has a lot of bored detectives on stakeout, if I recall...
How a character HANDLES boredom is a golden opportunity to show who they are.
Device one: character cleans, straightens, alphabetizes and rearranges everything. Give a start time. Give an end time. The end time will be 5 minutes later. (For humor)
Device two: Practice Spells Repeatedly whatever the spells are, however "boring" the character thinks they are, they aren't. For instance, the cantrip firefinger (stealing from D&D) would be the equivalent of flicking a lighter on over and over again, something that someone might do if they are bored. I have no idea what these spells are that you are having them have access to but--you can show that, or show evidence of them having practiced them excessively to stave off the boredom. Someone can walk in and see that evidence. So like there's a spell that levitates feathers or objects, and the student is seeing how many of them they can keep going at the same time--dropping all of them when someone finally comes in and distracts them. If it's an impressive amount, it's a great way to show they are good at magic. Or it could be the magical equivalent of walking in to find hundreds of pencils buried in the foam ceiling when you come to pick up a kid out of detention....You can probably do this with ANY spell. Or a number of them.
Device three: Add flashback to the boredom.
Device four: Have them be creatively bored. A bored genius is not the same as the rest of us... YOU see a room full of boring books (maybe all the same book of the same size) but he might see something else entirely... A way to create a maze, Rube Goldberg machine, as a way to prove the grand unification theory of magic, and so on and so forth.
Device Five: Screw up the spells. If they aren't good, or careful, or their mind just wandered, let there be physical evidence of a spell got a little out of their control. They can be concerned with hiding evidence of their failure (placing books over a scorch mark or something like).
Device Six: They begin focusing in on small details, knots in wood, scratches on something, typeface lettering...this can be a goldmine again, because it can lead them to discover something relevant to the plot later on.
Device Seven: Show time crawling on, but be brief about it. The reader will get the point. See the Douglas Adams quote above for an example of that.
Device Eight: The Cutback Movies use this. Basically, a whole bunch of other exciting things are happening, meanwhile cut back to the bored person, and they are making paperclip chains stuck in a room. Exciting thing, cut back to bored character seeing how tall they can stack books, exciting battle, cut back to bored character who has now arranged chairs so that they can be upside down while they try to score goals with paper wads in the trash can...and so on. You said several chapters--honestly can't say that boredom covered in several chapters without interceding action happening at the same time would be entertaining.
You don't even have to describe what the character did, just have evidence of their boredom everywhere in the room.
In the Douglas Adams example, you'll notice, that boredom is very neatly conveyed in a very short description. The passage of hours and time is interwoven in the description. You should be able to describe the boredom in short. You don't need pages to do it, or even half a page, just a scant paragraph will do.