The non European citizens must apply for work permit. There are some exceptions for some countries and even relaxation for work visa. You must check the site of migration agency. There are certain rules prescribed and certain criteria made for giving work visa. You should make sure you fulfill the criteria and requirements.
Norms of Applying for work permit:
Advantage of work permit:
If you are not living in Sweden then you must apply for visa before entering in the country. If you are already living in the country then you need to apply for it living in the country.
The employer offer letter and norms of your employment will be needed to be sent by your employer to the migration agencies just to make sure those match to standard norms of employment. After this compile and submit your application. Documents required for compilation passport photocopy, online application, your offer letter and passport photocopy of your family members. Once you have submitted these you have to wait for response from the agencies. Submit your relevant data to the nearest Swedish embassies.
If you want to extend your work permit, you need to apply for it before expiration of your current visa.