For those shows that say, “Filmed before a live audience,” it is slightly different than just a generic laugh track.
If you go to a live taping, first of all, they have a comedian warm up the audience, then they usually bring out the cast for some applause (and occasionally a few words) and then they start taping the show. They want you in a good mood, and eager to please.
Above the audience, scattered every couple of rows or so, are many microphones that capture the laughter, giggles, groans and other audio reactions of the audience.
So, for instance, the first time they tape a segment and there is a particularly funny scene or line, they capture that (huge) laughter and will use it - even if that scene has to have 4 or 5 retakes, for various reasons. So while technically you could say they were “cheating”, as the laughter was not for that particular 4th re-take, the laughter was at least genuine for the first time the audience watched the scene.
However, they also like to “sweeten” the laugh track. I am sure you all know somebody who has a loud or strange or odd sounding laugh…sitcoms love to have people like that in the audience, and they will zero in on that microphone to capture that person’s laugh.
Also, you can well imagine that the writers, producers and crew - plus their closest family and friends - are in that audience, yukking it up far beyond normal laughter. Sitting in those audiences, you begin to think you are surrounded by lunatics who will laugh at anything.
BTW, if there are scenes that are taped off site - perhaps in a car or a live shot at a beach or whatever, they will show that scene on the monitors and try to capture audience laughter for that as well.
Once everyone leaves the set, the audio people will then have multiple tracks of laughter and audience reactions to work with, and by the time the show is aired on TV, it has been added, sweetened and enhanced, but technically, they really are using the laughs from the real live audience.