What happens next?

How to tell your teacher you're having your period
Request to use the restroom.
Try to wait until there is a break in the class discussion or a transition between activities. Raise your hand or approach the teacher's desk and ask to visit the restroom.
Do this as soon as you suspect that your period is starting so you can avoid any staining. You may need to indicate that you can't wait, as some schools limit bathroom breaks.