To be registered in the Swedish Population Register as a student, you need to study for at least 12 months.
The required documents to bring to the service office (servicekontor) depend on whether you move by yourself or if you move with your family member.