Problems 1991 Buick LeSabre

When engine gets hot, especially after doing several errands with a/c, when I start up again, it stalls several times before I can trust it to take it on a road again. It happens when I hit the brakes, and even when I take my foot off the gas. Someone once told me it had to do with a filter, asked if it happened when brakes were used, and fixed it, but I cannot remember the explanation. Any info would be appreciated.