ABS/Trac lights stay on

Please help! Why are my ABS and Trac lights going on and off periodically?

Make, model and year?

A dirty ABS sensors could cause the light to come on. Are all four tires identical?

On a Pontiac Grand Prix (as the post is tagged), probably a hub assembly going bad, most likely in the front. The car will have to be scanned at a repair shop (the free code reading service at most auto parts stores cannot read ABS codes. Scanners that can do that generally cost from several hundred to several thousand dollars) to find out which one.