A restraining order is a court order form that is issued toward an indivdual preventing them from getting close to a person. It was first seen in the episode "Restraining SpongeBob."
Role in the episode
Squidward, after getting tired of SpongeBob bothering him at work, issues him a restraining order. SpongeBob isn't allowed to get within 15 feet of Squidward until the restraining order is lifted. Squidward is pleased by this but SpongeBob has difficulity handing out orders to Squidward due to the restraining order. However, Mr. Krabs then hires Patrick to take out the orders. Unfortunately for him, Squidward finds Patrick even more bothersome than SpongeBob and, at the end of the episode, changes the restraining order to have Patrick not allowed to come within 15 feet of him.