This quote means that when someone felt lonely, they could find solace in music. Music gave them a sense of comfort, like a refuge that they could escape to. By listening to music, they were able to distract themselves from their loneliness and find peace in the sound of notes that they were listening to.