Question: how does harry get the sword of gryffindor?
Answer: The Sword of Gryffindor is first seen when it appears in the Sorting Hat in the Chamber of Secrets. Harry uses it then to kill a Basilisk. From then, until the summer before Harry's sixth year, it rests in a glass case in the Headmaster's office.