“@teja c :Gryffindor's sword appears to people via the sorting hat when in extreme need. Refer Chamber of Secrets climax. Weak explanation by JKR but nevertheless. ”