“...Harry’s in a hurry.”
“Yeah, he’s off to the Chamber of Secrets for a cup of tea with his fanged servant.”
-- Fred and George Weasley (CS12)
“Now, Harry, I’m going to teach you a little lesson. Let’s match the powers of Lord Voldemort, Heir of Salazar Slytherin, against famous Harry Potter"
-- Tom Riddle in the Chamber of Secrets (CS17)
Only the “Heir of Slytherin” could open the Chamber of Secrets and control the Basilisk inside (CS9).
The descendents of Salazar Slytherin had one trait in common - they were Parselmouths who could speak snake language (Pm: Chamber of Secrets).
Through the centuries more than one "Heir of Slytherin" passed through Hogwarts -- for instance Corvinus Gaunt, who protected the Chamber in the 17th century when Moaning Myrtle's bathroom was built around the entrance. Corvinus made sure future heirs of Slytherin could still get in, and the monster could still get out (Pm).
Tom Riddle inherited the ability to speak Parseltongue through the Gaunt family on his mother's side. It took him five years, but eventually he figured out how to open the Chamber and release the Basilisk (CS17, HBP10).
Harry was never the true Heir of Slytherin through his family line. He was able to speak to snakes due to having part of Voldemort's soul embedded in his lightning-shaped scar (CS18, DH33).
The "Heir" was the soul-bit of Tom Riddle left behind in the Horcrux diary. Tom was able to gain Ginny Weasley's trust and eventually possessed her. He forced her to kill Hagrid's roosters because they might crow, a sound that is fatal to a Basilisk. He told her what to write on the wall with the chicken blood: "The Chamber of Secrets Has Been Opened, Enemies of the Heir, Beware" and he spoke Parseltongue through her to open the Chamber of Secrets and let out the Basilisk to attack the Muggleborn students and Mrs. Norris (CS8, CS17).
The Heir's love of the Basilisk literally came back to bite him. Harry stabbed the diary with a poison Basilisk fang (CS17), and Ron broke the locket Horcrux with the sword of Gryffindor (DH19), which had a blade "impregnated with basilisk venom" (DH15). Ron and Hermione also destroyed the Hufflepuff cup with a basilisk fang after Ron mimicked the sound Harry made in Parseltongue to open the Chamber (DH31).
Draco was never a Parselmouth or the Heir of Slytherin, and he was being honest when he told Crabbe and Goyle he didn't know who it was (CS12). His father Lucius had no idea that the Diary was a Horcrux that protected the immortality of Voldemort, or he wouldn't have given it to Ginny Weasley; he thought it was just some kind of anti-Muggleborn device (HBP23). When Voldemort returned he was furious with Lucius for managing to get the Diary-crux destroyed by Harry Potter himself (DH35).
Dobby the house-elf could not have known exactly what was going on with the Diary, since none of the Malfoys really understood it either. It's unclear what Dobby heard at Malfoy Manor that worried him so much about Harry, who was not a Muggleborn. Perhaps as a house-elf Dobby understood a dark object like the Horcrux diary better than Lucius Malfoy did. But the fact remains that two house-elves, Dobby and Kreacher, gave Harry information about the two dark objects most closely connected to the Heir of Slytherin: the diary of Tom Riddle, and the locket of Slytherin, and Harry was able to destroy them both (CS2, DH10).
Commentary
Etymology
"heir" = "one who inherits"