Simply by introducing the element of time travel, Prisoner of Azkaban naturally raises questions about time travel that many stories do--namely, what the rules of time travel are and when or if "changing time" is ever appropriate. By comparing the novel's two uses of time travel, the first being Hermione's using it to take a double course load and the second being Hermione and Harry's trip back in time to save Sirius and Buckbeak, the novel suggests that while time travel is a tool that can be used for many reasons, it's best employed for purposes that seek to right moral wrongs rather than for an individual's personal gain.
Unbeknownst to everyone except Professor McGonagall and Hermione herself, McGonagall arranges for Hermione to receive a Time-Turner (a small hourglass necklace) from the Ministry of Magic at the start of the year. With the Time-Turner, Hermione has the ability to take a nearly double course load by going back in time one hour to take two classes at the same time. For Hermione, this feeds her desire to learn as much as possible in a very important way--she's able to effectively learn twice as much as her classmates. However, as the school year progresses and particularly as exams approach, Harry and Ron begin to notice that Hermione's time traveling is taking a toll on her. Though they don't know how Hermione is making it to all of her simultaneous classes, they do recognize that she's tired, snappy, and more on edge than usual. She also spends all of her free time studying and has very little time or energy for anything else. Hermione's exhaustion and her compromised mental health suggest that there are consequences to time travel in the way she's using it. At the end of the year, she even admits this outright--messing with time this way isn't worth it for her.
Hermione and Harry also use the Time-Turner, at Dumbledore’s suggestion, to save both Buckbeak and Sirius Black from their unjust sentences. By encouraging them to use time travel in this way, Dumbledore suggests that time travel does have a place: in this case, it's being used to save innocent lives and right wrongs that cannot be fixed without time travel (or through the wizarding world's corrupt justice system, as in the Justice theme). As this is Harry's first time using the Time-Turner, however, Hermione introduces him to the fact that there are rules governing time travel: most importantly, that a person time traveling cannot be seen by their past or future self, as plenty of time travelers have killed themselves unwittingly by doing so. Harry and Hermione also realize that they're bound by Dumbledore's rules--that is, they need to do only what he asked them to do and no more. For both of these reasons, Harry isn't able to stop Snape from complicating things in the Shrieking Shack or capture Peter Pettigrew after he escapes, actions that would fundamentally change what he knew happened at the moment in which he went back in time.
During his trip back in time, Harry does discover that there can be exceptions to these rules--though he realizes that those exceptions can only look like exceptions from the time traveler's perspective during their time travel itself. This is why Harry realizes he can conjure the Patronus by the lake, thereby saving himself, Hermione, and Sirius--he knows that the version of him on the lake believes he saw James Potter, not himself, and so technically speaking, Harry isn't breaking the rules.
Though as far as the reader knows, all the characters' trips back in time are legal and follow established rules of time travel, Hermione’s realization that the toll of constantly traveling back and forth through time for her own gain isn't worth it says a lot about the way that the novel ascribes morality to the different uses of time travel. In Hermione's case, she was the only one who stood to gain from her time travel; it was a fundamentally selfish endeavor. Her trip with Harry to save Sirius and Buckbeak, however, was for a much nobler purpose, as it sought to free innocent victims from death and imprisonment. In this way, the novel suggests that while time travel may be available to individuals for their own personal gain, it's far more meaningful when people use it to right wrongs and improve society as a whole.
Responsibility, Morality, and Time ThemeTracker
Responsibility, Morality, and Time Quotes in Harry Potter and the Prisoner of Azkaban
"We're witnesses," said Harry. "You said hippogriffs attack if you insult them. It's Malfoy's problem that he wasn't listening. We'll tell Dumbledore what really happened."
"Yeah, don't worry, Hagrid, we'll back you up," said Ron.
"Did anyone see you?"
"Yes, haven't you been listening? I saw me but I thought I was my dad! It's okay!"
"It didn't make any difference," said Harry bitterly. "Pettigrew got away."
"Didn't make any difference?" said Dumbledore quietly. "It made all the difference in the world, Harry. You helped uncover the truth. You saved an innocent man from a terrible fate."