The time capsule is a machine that appears in the episode "Buried in Time."
The time capsule is actually a giant tartar sauce container, but it is now empty. According to the date printed on it, the time capsule has been around since May 1, 1960 (50 years ago at the time "Buried in Time" premiered).
Role in episode
When SpongeBob runs out of tartar sauce, he sees the date on the empty container and it is really old. So, he tells Mr. Krabs the idea of using it for future generations. Then, everyone begins to donate items to the time capsule. SpongeBob, Squidward, and Patrick get stuck inside of it until the end of the episode.