According to Jim Recap: Bad Word
Jim is left with Dana and Andy one day to watch the kids, and it just so happens that there is a Bears game on. Unfortunately none of them want to watch the kids - they want to watch the game. Andy and Dana are able to leave, so they go to a sports bar to watch the game so they can get out of the house. Jim doesn't have that luxury, so he's stuck at home. But just after Andy and Dana leave, the Bears throw an interception and Jim utters a few choice words, heard by the kids, and that's when the problem really starts.
The next day, Cheryl gets a call from the mother of one of the kids who Jim was supposed to be watching to learn that they picked up a new word while they were over the previous day. Naturally, she blames Jim, who in turn acts like he is offended, and Cheryl promplty apologizes. When Gracie utters the bad words shortly after Cheryl leaves the room, Jim gets Dana to keep quiet for a bit and takes Gracie to work the next day, where he and Andy get her to say the words until they are out of her system.
All is well until Ruby is at a recital and she falls, uttering the choice words again - at which point the other parents blame Jim's parenting skills. Cheryl tries to defend Jim, and he tries to stop her, but Ruby says that she heard it from Gracie, who heard it from Jim and... Cheryl isn't happy. So they head home, the girls are sent upstairs and Cheryl calls Jim a naughty name, just as the girls hear it, so everything's even.
This episode also includes an appearance of the family dog, Gary Sinise, but it isn't the same dog we first saw in The Cat Came Back episode (same name, apparently a different dog playing the role).

















