Since "evil magic" and "troubled spirits" are the objects of that sentence, we can infer that the masks are the physical manifestations of evil magic and, in the case of the Deku, Goron, and Zora masks, healed spirits (or souls). The Legend of Zelda: Majoras Mask is an action-adventure game developed and published by Nintendo for the Nintendo 64 home console.It was released worldwide in 2000 as the sixth main installment in The Legend of Zelda series and was the second to use 3D graphics, following 1998s The Legend of Zelda: Ocarina of Time, to which it is a direct sequel.
Cycle 2 Song of Healing Deku mask SoDT to night 1 Kafeis mask //KAFEI - OCA ECT 99r chest Set midnight meeting. "This is a melody that heals evil magic and troubled spirits, turning them into masks." If you get over 94r then get 5 rupees from the box beside Guru Guru before aliens and skip the laundry pool rupees (saves 4s).
Though there could be some mistranslation, Happy Mask Salesman says this (in the NA release) when he teaches you the song of healing: I take it to mean basically the same thing as souls. I'm quite confident it's actually their spirits (which may or may not be the same thing as their souls, depending on your interpretation).