I started getting a brownish discharge today & its not heavy like a normal period but it comes and goes lightly & my period is irregular why is that?

Many reasons for thi. Irregular periods can often be accompanied by irregular bleeding. Your age is very important here. You should have your hormone levels checked, have an ultrasound performed or even a biopsy of the lining of the uterus.
Many causes. You should consider pelvic ultrasound and possibly blood work in addition to pelvic exam with your doctor.