The Flying Dutchman sends Squidward through the Fly of Despair to suffer a long and horrifying fall as punishment for his constant complaining and annoyance. Squidward falls through the rift, screaming in horror as he disappears from sight. This display also scares SpongeBob and Patrick into complying with the Dutchman as they do not want to go through the same fate as Squidward.
Near the end, Squidward finally exits the Fly of Despair and crashes through his roof into his bedroom. However, before Squidward can enjoy his time back at his house, he gets teleported back to the Flying Dutchman's ship after SpongeBob and Patrick wish him back.
Squidward was in the Fly of Despair for about seven minutes of the episode "Shanghaied."