These are the souls of people who have died and the Gatekeeper cannot send to either the Light or Dark Realms. Souls can become “trapped” at the time of death. If a person was so focussed on a task, whether it be good or evil, if they die suddenly or violently the actual shedding of their mortal form their willpower can cause them to inadvertently channel magic. Since the magic does not have a “body” to inhabit, it jumps to the soul. The magic then remains “attached” to the soul until it completes the task it was trying to complete. Alternately the soul can forcibly be separated from the magic by exorcism or by persuading the soul to give up its task via contact through a medium. As long as a soul contains magic, the Gatekeeper in unable to move it onwards.
Since the magic required to anchor a spirit is incredibly small, compared to what is used to generate even a simple spell, Wandering spirits cannot really wield it. They can however use it to manifest a ghostly form or move objects. On occasion they can even take over a mortal body but that is not easy for them to perform due to the power needed which is why Demons by comparison can do it very easily.