Nagini is the name of a big snake closely associated with Lord Voldemort, Harry Potter’s main enemy.
Naga is the sanskrit word of a deity taking the shape of a snake. It is sometimes also used for ordinary snakes, like the cobra. A female naga is a nagi or a nagini. (Wikipedia)
Nagas are sometimes characterized as having human traits at one time, and serpent-like traits at another.
The Cobra was also used as a symbol of sovereignty, royalty, deity, and divine authority in ancient Egypt. The Ureaus, the rearing cobra, on the pharaoh’s crown is a symbol of an Egyptian goddess (Wadjet) who was often depticted as a cobra.
Very early in the first book in the HP series, we learn that Harry is able to communicate with snakes (he talks to one at the zoo, while he is still living with his aunt and uncle in the Muggle world and does not even know himself yet that he is a wizard).
It is not until his second year at Hogwarts that Harry himself learns that this ability is regarded with suspicion even among wizards; and that when he does it, he is in fact using a special language called parseltongue. A language which Harry never consciously learned, which most wizards neither speak nor understand, and which is associated with the Dark Arts.
There is a big snake involved in The Chamber of Secrets: a basilisk. But the basilisk is not Nagini.
Nagini is not introduced until the fourth book: The Goblet of Fire. But from then on and until very close to the end, Nagini is closely related to Lord Voldemort.
Already in the first book, we learn that Lord Volemort tried, but failed, to kill Harry when he was a little baby, just over a year old. For unknown reason, the curse he cast on Harry seemed to rebound on himself, and he was so much weakened by this that he lost his bodily shape. When we first meet Voldemort (in the first book), he is literally only a shadow of his former self. In the fourth book, after his ‘resurrection’, he gives his old followers, the Death Eaters, a summary:
I was ripped from my body, I was less than spirit, less than the meanest ghost… but still, I was alive. --- Only one power remained to me. I could possess the bodies of others. (GoF 33)
In The Goblet of Fire, however, Lord Voldemort regains a body of his own. We learn that a potion containing snake venom from Nagini was one essential ingredient in the mix of magic that got him started in that process. It is also a fact that when he does come back in bodily shape, it is with a very snakelike appearance.
Even though all the details are not clearly stated, a sort of first bodily rebirth trough the snake Nagini is suggested – to give him back a “rudimentary, weak body of my own, a body I would be able to inhabit while awaiting the essential ingredients for true rebirth” (GoF33).
Beneath the surface of this story, there are many layers of deep imagery; and Rowling borrows from more than one source. One thing that to me stands out beyond doubt though, is that Tom Riddle/Lord Voldemort is meant to be an ‘Antichrist’ figure. Besides the basic concept of ‘the Beast’ in the Book of Revelations, Rowling also uses ‘anti’-analogies like: While Jesus according to Christian belief was both human and divine; the ‘reborn’ Lord Voldemort is half human, half snake. And while Jesus sacrificed himself for others, Tom/Voldemort without hesitation sacrifices others for himself.
In Revelations Ch 13, a scene is described where a beast with seven heads comes out of the sea. All its heads are different. A dragon (dragons and snakes are more or less interchangable in many old stories) “gave the beast his power and his throne and great authority. One of the heads of the beast seemed to have had a fatal wound, but the fatal wound had been healed. The whole world was astonished and followed the beast.” (Rev 13:3)
As the HP story goes on, it becomes clear that Lord Voldemort too has “more than one head”, and therefore is no ordinary enemy.
There also seems to be a mysterious bond between Harry and the Dark Lord, to do with the scar that Harry still has on his forehead from when Voldemort tried to kill him back in his childhood. What protects Harry though is the fact that his mother (Lily) sacrificed her own life for him. There is magic in sacrificial love which goes beyond Voldemort’s understanding; and of course, in the end that proves to be his downfall.
In connection with Nagini there are also references implied to the Ouroborus symbol depicting a serpent or dragon eating its own tail. (For example, in GoF33, Nagini is described as “continually circling” while Voldemort tells his story to the Death Eaters.) In religious, mythological and alchemical symbolism it represents recreation and other things perceived as cycles. Alchemy is another of the recurring themes in the HP books.