A piece of Riddle’s soul was contained in the diary that Lucius Malfoy left at Ginny Weasley’s bookstore. The ink with which the girl wrote nourished Tom. He subdued her, forcing her to run errands.
Tom Riddle is no longer just a memory. If he was able to lift Harry’s wand, then the matter of the Dark Lord’s rebirth had gone too far.
What does a diary have to do with this?
Tom summons a Basilisk, whose gaze is deadly. Harry is helped by Phoenix Fawkes, who has arrived, bringing a Sorting Hat, from which the Gryffindor sword appears. The bird pecks out the snake's eyes. The boy kills the basilisk with his sword, but the monster manages to injure him with its venomous fang. Pulling the fang out of his hand, Harry pierces Riddle's diary with it.
Snake venom corrodes the pages, the diary drips with ink, and Tom disappears with a scream in a flash of light. Ginny regains consciousness, and Fawkes' tears heal the boy's wound and neutralize the effect of basilisk venom. The guys fly away from the dungeon — they are carried away by the phoenix.
The destruction of the Horcrux