You can find comprehensive information about how to apply for a residence permit and the rules regarding residence permits in Sweden on the Swedish Migration agency’s web page. Moving to someone in Sweden