It could be Dumbledore. He has great power and knowledge. He might have some secret plan all along. He could use his influence and magic to enter Azkaban and free Harry, especially if he discovers that Harry is wrongly imprisoned.
In the 'harry locked in azkaban fanfiction', it's possible that Voldemort has a hand in getting Harry locked up in Azkaban. Harry, being the strong - willed wizard he is, tries to communicate with the other inmates to find out if there are any clues related to Voldemort's new plot. He also has to deal with the harsh conditions of Azkaban, like the cold and the constant threat of the Dementors sucking out his soul. But he doesn't lose hope and keeps looking for a way to escape and save the wizarding world from whatever danger Voldemort is planning.
Harry might survive in Azkaban because of his connection to his friends, even if they betrayed him. Their memories could give him the strength to hold on. And he may be able to use his magic in unique ways. He could draw on the positive emotions he has left, like his love for his parents, to create a shield against the Dementors. Plus, he may be constantly looking for a way to prove his innocence and that hope could keep him alive.
He might use the invisibility cloak. Harry could sneak into Azkaban unnoticed and then use magic to break Draco out of his cell. The cloak has served him well in the past, and it would be a simple yet effective way to get past the guards.
Maybe he uses some powerful magic spells that he has learned secretly. For example, the Patronus charm could be used to fend off the Dementors which are the main guards in Azkaban. He might also get some unexpected help from his friends or some mysterious characters within the fanfiction world.
It could be Sirius Black. Since he has his own experience with Azkaban, he might know some secrets about the place. He could return in some form within the fanfiction and assist Harry in his escape, maybe by leading him through some hidden tunnels or using some special skills he developed during his time in prison.
Well, in some fanfictions, Harry might use some hidden magic he discovers in Azkaban. Maybe he finds a way to turn the Dementors' power against Voldemort. Since Dementors can suck out a person's soul, Harry could somehow direct them towards Voldemort, weakening him enough to deliver the final blow.
In the fanfiction, the female Harry Potter might be sent to Azkaban as part of a plot by Voldemort to get rid of her. While in Azkaban, she discovers a hidden power within herself. It could be related to her connection with her mother or some ancient magic. She then starts to influence the other inmates with her positive energy, and they start to believe in her as a symbol of hope against Voldemort.
Well, it could be many reasons. Maybe there was a misunderstanding. Some dark magic might have been used to make his friends think he did something bad. Or perhaps a powerful enemy framed him by planting false evidence. It's hard to say exactly without more context from the fanfiction.