Does the pill regulate

My period has always been kind of irregular, ever since I got it when I was in like 7th grade. Now I’m 18, and they seem be getting even more irregular as time goes on. I was wondering, is it true that taking the pill will “regulate” your period over time or is that not true?