If you will be in Sweden for more than three months and you are not an EU citizen, you need a residence permit.
You will find information on the different types of visas that you apply for:・A residence permit to move to a close relative in SwedenResidence permit to live with a partner, child or other relative – Swedish Migration Agency・A residence permit to study in SwedenResidence permit for studies in Sweden – Swedish Migration Agency・A work permitWork permit or residence permit to work in Sweden – Swedish Migration Agency
In order to join your family or relative in Sweden, you must have a residence permit.
Read more at Swedish Migration Agency about how to apply for yourself and on behalf of your child.