She might use her extensive knowledge of magic. For example, she could brew a complex potion that cures a deadly curse Snape has been afflicted with. Hermione is known for her academic excellence in potions, so it's very likely she'd use this skill to save him.
Perhaps Hermione uses her quick thinking and resourcefulness. She notices Snape in a dangerous situation, like being trapped in a magically - created maze that is slowly draining his life force. She then uses her knowledge of charms and spells to break the maze's hold on him. She might combine different spells she has learned over the years at Hogwarts, showing her ability to think on her feet and use magic in innovative ways.
Well, it could be that Hermione figures out some sort of time - turning magic. Maybe she goes back in time to prevent the event that would have led to Snape's death in the first place. She discovers the danger Snape is in before it actually happens and takes steps to stop it. This would require a great deal of courage and a deep understanding of the principles of time magic, but Hermione is more than capable.
Well, perhaps Snape uses his position as a teacher to step in. He could have been observing the situation secretly and when Draco was about to do something harmful to Hermione, Snape intervened with a firm command or some magic spell to stop Draco in his tracks.
Well, it could be that Snape has been secretly observing Ron's erratic behavior towards Hermione. When the situation gets out of hand, he intervenes. He might use his position as a teacher to discipline Ron and in the process, saves Hermione. Snape is a complex character with a lot of power and knowledge, so he could use various means like his occlumency skills to sense the danger Hermione is in and act accordingly.
Snape, being a skilled wizard, could use magic to protect Draco. He might cast protective spells around Draco when he's alone or in vulnerable situations. Maybe he uses a spell that alerts him whenever Draco is in danger, so he can rush to his aid immediately.
One possible reason could be that Snape sees Hermione's value as a brilliant student. He might recognize her potential and not want it to be wasted just because of her dad's actions or situation. Maybe he has a sense of justice deep down, despite his often cold exterior.
One reason could be Snape's sense of justice. Despite his often - cold exterior, he might not tolerate Draco's bullying behavior towards Hermione.
In the fanfiction, the relationship may start off with Snape being rather cold and distant towards Hermione as his familiar. However, as Hermione proves herself time and again, perhaps by using her unique skills to solve problems that Snape couldn't on his own, he starts to warm up to her. Their relationship then develops into a more complex one, where they have a mutual respect and a sort of unspoken understanding. This could involve Snape sharing some of his own magical knowledge with Hermione in a way that he would never do with other students, and Hermione in turn, helping Snape with his personal and professional matters, such as dealing with the other Hogwarts faculty or protecting the school from hidden threats.
In many such fanfictions, Snape might notice Hermione's change in behavior. For example, she could become withdrawn or less enthusiastic in class. He's a very observant character, and her academic performance might also start to decline. He could pick up on the signs during one of his patrols when he sees her looking distressed or if he overhears something that makes him suspect she's in trouble.
One consequence could be that Hermione gains a new ally in Snape. Snape, being a powerful and knowledgeable wizard, could offer her guidance and access to knowledge that she wouldn't otherwise have. He might share some of his more advanced potions techniques or insights into the dark arts (for the purpose of defense, of course). This could enhance Hermione's own magical abilities and her standing within the wizarding community.
Well, in some fanfictions, Snape might use his powerful magic skills secretly. He could cast a spell to deflect Bellatrix's attack aimed at Hermione just in time. For example, he might use a Protego spell in a very sneaky way that Bellatrix doesn't notice until it's too late.
Well, in many such fanfictions, Harry might use his magic skills. He could cast a powerful stupefy spell on the troll to stop it in its tracks and then quickly lead Hermione to safety. Maybe he also uses his quick thinking and knowledge of the Hogwarts corridors to find a hiding place where the troll can't reach them.