Ignore the erection; it should go away in no time! If it doesn't, move around or think about your homework or your school (anything that's not sexual)
If your case is severe in the sense that it doesn't go away within 4 hours, then you might have priapism. The Wikipedia article on it is here
Hi. I'm Romeo. Nice to meet you!
This isn't my real name, in case you were wondering.
I will always be here on my computer if you need any advice.