If you want to study in Sweden for more than three months, you need a residence permit.
More information is available at study in Sweden.