My service engine light keeps coming on and off. Do you know why? on 2002 Buick Regal

the track light and service engine light comes on and off frequently do you know why?

Asked by for the 2002 Buick Regal
my.check engine comes on every time i turn my engine on and it runs a little rough as if it needs spark plugs but it is 2008 nissen sentra
I have a 1996 Buick Regal - I took it into a shop and had the Diagnostic machine put on it to determine why the Check Engine light kept coming on. For MY car, thanks to the diagnostic, turned out to be the Mass Air Flow Sensor. Get it on this machine and you can determine what the exact problem is.