Dobby was a House Elf and a character in the Harry Potter Franchise. He cannot work against their orders or interests. He is treated like a property belonging to a family. Dobby was born on 28 June as said by the Author, but the year is unknown. He is made to respect his owner and if he does not follow the orders of his master he punishes himself.
What powers does Dobby have?
Dobby is very loyal to the people he cares about. Whatever the Malfoys told him to do, he did because he was forced. Even of the loyalty he owes to the Malfoy family, Dobby still tries and fails in the second book to protect Harry. He helps Harry in a small task in Goblet of Fire, tells him about the Room of Requirement, warns the DA, and follows Draco Malfoy for him. The House Elf is also loyal to Dumbledore who employs him, and helps his friend Winky when she is drunk. He is also a hard worker. Dobby is also a very grateful person and definitely a good friend to have around.
What does he do in the Harry Potter Franchise?
Dobby is emotionally very simple and behaves like a child but forms relationships very quickly. Initially, he is made to be loyal to the Malfoy family, but even with that loyalty, he tries to protect Harry, who he sees as a saviour. As Harry defeats Lord Voldemort who treated house-elves badly. So Harry is respected because of what he did for the house-elves. Dobby must look for some other Master to serve, eventually setting on Hogwarts and Dumbledore. His loyalty is to the school, but he also loyal and protective of Harry. He takes care of Winky, who he feels responsible for having found her the job at Hogwarts.
How did he die?
Attempting to rescue Hermione and Griphook, Bellatrix threw her silver knife at Harry. Harry, not knowing where he was heading, was relieved to find himself safe that he could feel Dobby alongside, he held his fingers firmly in his hand. After reaching Cottage, Harry discovered that Dobby had been wounded by Bellatrix’s thrown knife, which hit the elf’s chest. Dobby died in Harry’s arms, a peaceful smile on his face, his last words being Harry’s name.