In some fanfiction, Harry could simply run away on foot. He might have been planning it for a long time, stashing away some food and supplies. He waits for the right moment, like when the Dursleys are all asleep, and then he just bolts out the door and starts running, using his knowledge of the neighborhood to avoid being caught.
Maybe he gets help from his friends. For example, Ron and Hermione could come up with a plan. They might send him a magical object that can help him escape, like a flying broomstick that he can use to fly away from the Dursleys' house without being noticed.
Perhaps Snape uses magic to create a distraction at the Dursleys' place. He could make strange noises or apparitions that scare the Dursleys, and while they are in a panic, he grabs Harry and disapparates. This would be a quick and efficient way for him to rescue Harry.
Well, in some fanfic scenarios, Voldemort might have made a deal with someone who has access to the Dursleys' house. For example, he could have bribed or threatened a neighbor or someone who works in the area. Then, when the time is right, he enters the house under the guise of this person's help and rescues Harry. It could also be that Voldemort has some sort of inside knowledge about the protective spells around the Dursleys' place. He finds a loophole in those spells and slips in to save Harry.
Loki could enlist the help of some unlikely allies. For example, he might strike a deal with a creature from the realms outside of Asgard. In exchange for a future favor, this ally helps him escape by providing a means of transportation or a way to bypass Asgard's defenses.
Maybe Percy uses his magic skills to create a distraction. He could conjure up some strange creatures outside the Dursleys' house. The Dursleys, being afraid of all things magical, would be distracted long enough for Percy to sneak in and get Harry out.
In the fanfic, Snape might use his knowledge of the Dursleys' house layout. He may enter the house unnoticed, find Harry, and then use a Portkey to quickly get them both out of there. He could also have some sort of charm or potion that he uses to counter any magic the Dursleys might have used to keep Harry there, like a spell - breaking potion. And he may have planned the whole rescue very carefully, choosing a time when the Dursleys are least likely to notice, like in the middle of the night.
Well, he could use his magic skills secretly. Maybe he casts a spell on the Dursleys to make them docile or distracted long enough to get Harry out. For example, he might use a Confundus Charm on them so they don't notice Harry leaving.
They could use magic to disguise themselves. For example, Hermione is very skilled at the Polyjuice Potion, so they might use that to change their appearances. They would also need to be careful with their magic use to avoid detection by the Ministry's trace. Maybe they would use non - traceable magic like some ancient spells that are not well - known.
In some fanfics, he might be saved by his latent magic power that suddenly bursts out when he is in extreme danger. For example, it could create a protective shield to fend off the Dursleys' attacks.
Well, it could be that Draco has a change of heart early on. He realizes that the Dursleys are truly awful to Harry. So he uses magic to create distractions. He could make strange things happen around the house that scare the Dursleys so much that they just want Harry to leave. Then Draco could be waiting outside and whisk Harry away to a safer place, like a hidden place in the wizarding world where he has set up a little haven for Harry.
There are many ways it could be written in fanfiction. Ginny might use her knowledge of the wizarding world and Hogwarts' secrets. She could use a special spell that she learned from an old book in the Hogwarts library. This spell could create a portal right inside the Dursleys' living room that only Harry can see. Ginny could then communicate with Harry through a magical device, tell him about the portal, and he can use it to escape from the Dursleys. Ginny would have to be very careful and plan everything precisely to avoid detection by the Ministry of Magic, as using magic around Muggles without permission is strictly prohibited.