What determines when your period is irregular?

Emily