Snail plasma, a term used in "I Was a Teenage Gary," is a slime produced by sea snails used to move about. Sometimes, it is required to inject some into a sick snail, but if injected into a being other than a snail, then that being would turn into a snail.
Role in episode
Purple Doctorfish tells SpongeBob to inject his pet snail Gary with snail plasma to cure him, and the injection must be carefully administered. But however, Squidward accidentally injects SpongeBob with it, changing the latter's DNA and turning him into a snail.
Later, Squidward accidentally injects himself when SpongeBob was chasing him which causes total chaos wrecking the house, turning him into a snail too while being injured.