@Liquidxlax She actually learned it like the other magic, she only needs to think of and cast a spell to get the affinity with it, like with water, she thinks of summoning a water ball, says "water ball" and poof, she uses the spell and gets the affinity.
For the dark Magic, she did the same, thought of shadows, said "darkness" and poof, her light couldn't enter her room anymore and everything turned dark. Since she couldn't see in the darkness, she tripped and fell, before dispelling her magic. We couldn't see a thing because she summoned darkness with that spell. And thus she learned the spell.
I suppose she is unable to use space magic because she can't picture the effect correctly in her mind. She should probably try to create a gate like the portal gun from Portal to learn it, I guess?