Loyalty has been a theme from the first book. Loyalty and bravery are Griffyndor's main traits. Yet it is in this book that loyalties are tested. For the first time, people have to choose sides. Until now, everyone was biding time. With Voldemort's return, people have to decide if they believe that he is back or not. Dumbledore is no longer just the headmaster, he is a potential enemy. Harry's classmates have to decide whether to side with him or against him. Every wizard has to choose. This is signified in the beginning of the book, when we are introduced to the secret underground group The Order of the Phoenix, loyal to Dumbledore.
There are many specific moments, as well, where loyalty plays an important role:
Arabella Figg is loyal to Dumbledore, and thus keeps an eye on Harry, even though it is the job of Mundungus Fletcher. Fletcher, who does not know loyalty, leaves his post, causing Harry to get attacked. Without Mrs. Figg, Harry would have no witnesses to the Dementor attack and would have been expelled.
Kreacher, the Black house elf, is another example of anti-loyalty. He is tied to the house because of the charms upon him, but he is not loyal to Sirius. Therefore, when Sirius messes up, and tells Kreacher to "go", Kreacher is able to twist his words and leave the house. This moment is a turning point, because Kreacher joins up with the Malfoys, to whom he does feel loyalty, and eventually is able to mislead Harry and cause the stand-off at the Ministry that lead's to Sirius' death.
Loyalty exists in the relationship between Sirius and Harry. Sirius has become Harry's protector because of Sirius' relationship to Harry's parents (his loyalty to Lily and James). Harry becomes loyal to Sirius - often getting angry when others make any comment that could seem critical of Sirius, no matter how true - because of the affection Sirius shows toward him. Their loyalty brings them both to the Ministry. Although it leads, in a way, to Sirius' death, Rowling shows us in many ways that loyalty is still a positive trait.
Snape's loyalty is another great example. He hates almost everyone in the Order of the Phoenix, especially Sirius. However, his loyalty to Dumbledore causes him to set actions in motion that bring the Order to the Ministry and to the rescue of the D.A. group.
Umbridge, wretched woman that she is, is loyal to the Ministry. So loyal, in fact, that she is willing to break the law and release Dementors on Harry in order to remove him as a threat to the Ministry's credibility. She is also so loyal that she considers using an unforgiveable curse to get information on behalf of the ministry.
One more example of anti-loyalty. Cho Chang's friend Marietta is not loyal to the D.A.. Her disloyalty causes Hermoine's hex to disfigure her face, and it also causes the removal of Dumbledore as headmaster.
Loyalty is a theme threaded throughout all of the Potter novels, both at Hogwarts and beyond. Dumbledore commands and receives absolute loyalty from his followers. The members of the Order of the Phoenix have pledged their absolute dedication to Dumbledore, and, despite the protests of the Ministry of Magic and much of the Wizarding world, their loyalty holds firm, and they believe, without question, what Dumbledore tells them about the return of Voldemort. At Hogwarts, many of the students and faculty members remain tremendously loyal to Dumbledore. After Dolores Umbridge replaces Dumbledore as Headmaster of Hogwarts, the students and faculty voice their protest by refusing to behave for Umbridge, making her life at Hogwarts as difficult as possible. There is also tremendous loyalty between Harry, Ron and Hermione; the D.A. is also introduced in this novel. For the most part, this is a group totally devoted to protecting Hogwarts from evil both within and without. When time comes to help Harry at the Ministry, there are several members of the D.A. who demonstrate extreme loyalty in the battle that ensues. Loyalty plays a very important part in this part of Harry Potter.
There are many examples of loyalty in Harry Potter. To me, the most prominent example was the loyalty of Hogwarts students, professors, and even the ghosts, to their headmaster, Albus Dumbledore. The students, professors, and other magical creatures unite despite their differences against the efforts of Dolores Umbridge and the Ministry of Magic to diminish Dumbledore's power at Hogwarts. Even the nastiest professor, Severus Snape, is against Umbridge and Peeves the Poltergist, who would seem unbound to any person or cause, displays the greatest effort in trying to force Umbridge out of the school. The castle itself seems to be loyal to Dumbledore over Umbridge. Loyalty is clearly very moving to Dumbledore, who is very touched when he discovers that Harry's secret Defense Against the Dark Arts group had named themselves in honor of him.
This is really more simpler than you make it to be. Harry is always loyal, Simple. Hermione is loyal to those who are loyal to her. Ron basically always follows Harry. Draco is loyal to himself. Voldemort it loyal to no one, not even himself. Dumbledore, like Harry is always loyal. Neville is not a lenient as Harry and Dumbledore. The rest of the characters are vagely important as those listed. everyone is as their character is.