You must register for the course you're going to study no later than at the start of the semester or course to demonstrate that you're an active student. If you're enrolled in a programme, you must register for each new course within your programme.
You register through Ladok for students. The registration period opens one week before the course starts. When you register, you show that you're an active student on the course.
Keep in mind that if you're taking a course that spans multiple terms, you must register at the start of each semester to show that you're still active on the course.