One way is through magical means. Slytherins are known for their magical skills. They could cast protective spells around Hermione when Ron is in a foul mood. For instance, a spell that would make Ron unable to approach Hermione without permission. Another way is by using their knowledge of the Hogwarts layout. They could lead Hermione through secret passages away from Ron.
Slytherins might protect Hermione from Ron by befriending her. Once they are friends, they would naturally defend her. They could use their charm to calm Hermione down when she's upset by Ron. And they would use their Slytherin pride to challenge Ron if he tries to bully Hermione. They might say things like 'You don't deserve someone as brilliant as Hermione, so leave her alone' to Ron.
In fanfiction, Slytherins may protect Hermione from Ron by appealing to authority. They could go to professors like McGonagall and report Ron's inappropriate behavior towards Hermione. This would put pressure on Ron to behave. Also, Slytherins might use their social standing among the students. If they side with Hermione, it could make Ron an outcast in a sense, and he would be less likely to target Hermione.
In some fanfictions, Slytherins might protect Hermione from Ron by using their cunning. They could manipulate situations to keep Ron away from her when he's being unreasonable. For example, they might create distractions during an argument between Ron and Hermione, leading Ron astray so he forgets about his anger towards Hermione.
One possible reason could be that Draco has had a change of heart. Maybe he realizes that Hermione is a person worthy of protection regardless of her House or her friendship with Ron. He might have seen some injustice about to befall her from Ron and his Gryffindor bravado getting out of hand.
One reason could be that they recognize her intelligence and see it as an asset. They might want to form an alliance with her, and comforting her is the first step. For example, in a war - torn Hogwarts, they know Hermione's strategic mind could be useful, so they reach out to comfort her to gain her trust.
In some fanfictions, Ron saves Hermione from Bellatrix in a more psychological way. He manages to get into Bellatrix's head, using a rare mind - influencing spell. He makes Bellatrix see her worst fears, which causes her to drop her wand and flee, leaving Hermione unharmed. This shows that Ron doesn't always have to rely on brute force to save Hermione. It also adds an interesting layer to his character as someone who can be clever and resourceful in different ways.
Well, in some versions, they might use their knowledge of the castle's secret passages to lead the troll away from Hermione. They could also work together as a team, using their Slytherin cunning to outwit the troll.
Ron might take Hermione to a hidden or safe place within the nightmare setting. It could be a secret room or a place only he knows about in that fictional world.
One key moment could be when Ron says something really hurtful in a fit of jealousy. Harry might step in immediately, telling Ron to stop and defending Hermione's honor. For example, if Ron makes a snide comment about Hermione's intelligence being overrated, Harry would firmly say that Hermione's intelligence is one of the things that has saved them all many times.
One possible scenario could be that Ron says something really mean to Hermione during an argument, and Draco, who has secretly been observing Hermione's intelligence and kindness, steps in to defend her. Maybe he uses his quick wit to shut Ron down verbally.
One way is by using their magic combat skills. Fairy Tail wizards are very powerful in combat. They can directly engage in battles against any threats to Hogwarts. For example, Gajeel could use his iron dragon slayer magic to fend off enemies.
One reason could be that Hermione is a strong - willed character. In fanfiction, Ron might be depicted in a way that undermines her independence. She wants to be seen as her own person, not just as Ron's love interest.