Go to the website hogwartsonlineschool.com and go to the forums. Register as a new member, read the rules and handbook, and take the Sorting Hat quiz.
When registering as a new member, you cannot use a screen name, meaning you must use a real name. Using canon last names from the series, such as "Potter" or "Weasley," is also forbidden and results in your account getting deleted.
When you sign up, you are automatically enrolled at Hogwarts as a student, but if you wish, you can apply to play an adult character such as a professor or grounds worker. To do so, you must already have an established student account, so you must be patient. Once you do that, check the forums for which roles are taken and which are available. There is no general application, so once you find the character for which you want to apply, follow the appropriate links, and fill out the specific application.
To make sure you read the rules and handbook, there is a secret phrase you must enter when signing up. Keep an eye out for it when reading to save some time and not get caught by surprise.
If you have further questions after the initial sign-up process, you can get answers from your handbook, sign up for a mentor or private message the leader of one of your classes.