As mentioned before there is indeed a process to get magic from different people and enhance one's capacity for magic. An example of this was when Mei’s mother took half of Jaya’s powers and gave them to Mei and Aruna.
This process is similar to that of a blood transfusion or a bone marrow transplant in that you have to match types. (Not a perfect comparison as I don't know the exact details of the process but from a completely basic level it's a good match)
The safest bet is usually within the family, as the chances of having the same type of magic signature is higher between blood relations but there are some universal donors and receivers.
A good example of this would be the Royal family. Their magic is pure so they can pretty much receive it from anyone and purify it within themselves (albeit with some risk) and they can give it to anyone with no risk at all.
Reading on this site? This novel is published elsewhere. Support the author by seeking out the original.
Contamination happens when someone takes in magic that is incompatible with their own. Like giving someone with type A blood a bag of Type B blood; except rather than immediate death they go into a crazed beast-like state.
The intensity of this state varies from just being ‘volatile’ to being completely barbaric with no verbal skills.
Their instinct in this state is to seek out those with a similar magic signature to themselves and absorb their magic for themselves and overwrite the ‘bad magic’ with the good.
The transfer of magic isn't illegal but it is frowned upon, Its kinda seen as doping or using steroids. (Except during competitions. While steroids are seen as grounds for suspension magic transfusion is seen as a (rather unsavory) but still legitimate way to strengthen the self)