Automatically enroll to course

I would like to automatically enroll user to a course when he signup. Please suggest any ways to do it.