Unregular period

sam

Sometimes my period is unregular. Like it won't come one month then I'll get it every month for a while then it won't come again. Like 2 months ago I don't think I got it then last month I got it but it was a few days late but it still came and now this month it hasn't came. Why is this?