Question: how does harry potter get the sword of gryffindor back?
Answer: Snape deposited the real sword in a frozen lake in the Forest of Dean and used his corporeal Doe Patronus to guide Harry to the sword. When Harry tried to retrieve the sword, the Locket of Slytherin closed around his neck and attempted to strangle him, sensing that its destruction was near.