This song is about the granddaughter of one of Mccartney's neighbors who was a chatterbox at home but totally silent at school, in the classroom or playground. Her grandparents described it as "She's given up talking," an idea that intrigued him. In the song, he guesses at the reason for her silence ("someone made her angry, someone's got her scared"), but she's mysterious, fitting the mood of the music.
The girl almost certainly had selective mutism. The song is an almost exact description of it: someone does not speak a word at school but talks more than anyone else at home. (It's usually because of fear and not always someone's fault, so his guesses were close but off.) Many people with selective mutism say this song is "the story of my life."