If you have the status as a “long-term resident” in another EU country (e.g in Italy) and want to study in Sweden for more than three months, you can apply for a residence permit after the arrival in Sweden. You can study during the processing of your application for residence permit.
The application is handed in, or sent to, the Swedish Migration Agency. See their website for information about required documents and application form.
A person with the status as a long-term resident in Italy has the text “soggiornante di lungo periodo UE/CE” on the Italian residence permit card.
If you cannot apply from Sweden
If you have the status as a “long-term resident” in another EU country (e.g in Italy), but you cannot apply from Sweden, you need to book an appointment with the Embassy of Sweden in Rome to register your application. The application will then be sent to the Swedish Migration Agency for handling and decision.