SpongeBob is taking his driver's license exam yet again, and ends up leaving the driving course and wrecking the city before driving off an unfinished bridge the mayor just
opened. The police follow the boat and end up driving off the bridge themselves. They hit a truck full of fruit punch which is being delivered to Shady Shoals Rest Home, causing it to explode and flood the home in punch. Although SpongeBob is responsible, Mrs. Puff is sent to prison for gross negligence. In prison, she realizes that she'll never see SpongeBob again, and starts to enjoy it.
Meanwhile, SpongeBob is depressed that Mrs. Puff in jail, and Patrick tells him it is his fault. The duo set out to free her from jail, first trying to rob the "1st Nautical Bank" in order to get arrested themselves, but fail.
They then disguise themselves as rocks that the prisoners are made to smash as labor, and try to communicate with Mrs. Puff, who calls the guards, but they dismiss it as a hallucination and move her to kitchen duty. SpongeBob and Patrick are then smashed by another inmate, costing them their deposit on the costumes. They then hide in a vat of chilli in the cafeteria and offer to help Mrs. Puff escape through it, but she explains to them that she likes it in prison, which they refuse to believe. She calls for the prison guards again, and is reassigned again. SpongeBob and Patrick appear to her yet again on a hanger assembly line, and when she calls for the guards, they dismiss SpongeBob and Patrick as raw materials and send Mrs. Puff to her cell, convinced that she is going insane. SpongeBob and Patrick next appear in Mrs. Puff's toilet, and when she calls the guards, they turn out to be SpongeBob and Patrick in disguise. When she next sees the guards, she rips off their faces, and is put in solitary confinement. She is glad that she is finally safe from SpongeBob, but she begins hallucinating her room to be made of sponge (SpongeBob), and actually goes insane.
Mrs. Puff wakes up screaming in the car flying off the cliff, and realizes that it was a dream. The car crashes to the fruit truck again and they was arrested again. However, this time Mrs. Puff isn't the one that got arrested, it's SpongeBob. While she's happy because not going to the jail, a police officer told her she already did her time, and Mrs. Puff realized that she's already wearing a jail outfit. She screams, and wakes up screaming in the car flying off the cliff again. When she was about to relax, it turns out that the one that driving the car isn't SpongeBob anymore, but one of the prisoner that incrediculously asked her what's "the jail's dinner menu tonight". She screams, and wakes up screaming in the car flying off the cliff, yet again. This time SpongeBob's driving. She goes panic for a while, but after realizing it's just going to loop again, she give up screaming and says "Oh, forget it".
Originally, the episode ended with a scene similar to the beginning, but this time, it was SpongeBob that got arrested instead of Mrs. Puff, much to her delight. See List of deleted scenes for more information.
This is the first time SpongeBob and Patrick break into a place. The next time will be Safe Deposit Krabs.
In this episode, Mrs. Puff's screams sound extremely similar to Sid's screams in the Ice Age films.
This episode's cutaway gag (when SpongeBob tells Patrick that she forgot about the outside world of prison, the random fish is shown going to work, then being there then looking out the window at night as his wife asks if he's coming to bed) is a perfect example of the similarity to Family Guy's cutaways.
This episode is a paradox, which means it is a never-ending cycle.
It is revealed that Mrs. Puff's first student is SpongeBob when she opens her Boating School. As of her flashback, this explains the origin of boating disaster.
When Mrs. Puff gets thrown into "solitary confinement", there's a rubber ducky in the corner (first scene in the sponge room only)
The scene where SpongeBob and Patrick are robbing a bank have become an internet meme.
The name of this episode "Doing Time" references the saying of spending a period of time in prison.
Mrs. Puff is placed in a padded cell in a straightjacket, a reference to the cover of the Iron Maiden album "Piece Of Mind"
Mrs. Puff's hat changes colors during this episode. When Mrs. Puff goes to lunch duty, her hat turns from red to blue, and one second later, it changes back to red. When the police are leading Mrs. Puff into jail, her hat changes from blue to red to blue again. And when Mrs. Puff drinks her cup of water her hat turns black then back to red. Then again, most of the episode is a dream.
When Mrs. Puff's jail cell is first shown, there is a single bed. But later, it is a bunk bed. Once again, this can be excused because it is Mrs. Puff's dream.
When SpongeBob crashes into the juice truck for the second time, the boat he was driving can be seen. But in the next shot, it is gone.