"Young Goodman Brown" by Nathaniel Hawthorne is a dark and rather fanciful tale of a man who has a dream in which he encounters the devil and many of the devil's followers.
Goodman Brown is walking to the forest when he meets an old man, rather indistinguishable from any other other old man except for one thing.
[T]he only thing about him, that could be fixed upon as remarkable, was his staff, which bore the likeness of a great black snake, so curiously wrought, that it might almost be seen to twist and wriggle itself like a living serpent. This, of course, must have been an ocular deception, assisted by the uncertain light.
Like all of Hawthorne's writing, this is a tale full of symbolism, and this staff is one of those symbols. We know that Satan came to Adam and Eve in the guise of a serpent in Genesis 3, tempting her to eat the fruit of the one forbidden tree, enticing her with promises that she would be as wise as God if she ate the fruit. We also know that this old man leads Goodman Brown into the forest where he sees and experiences some dark and evil things. The old man clearly is (represents) the devil, and this staff is proof of it.
The staff responds, as if it were alive, to the old man who is carrying it. Once the old man laughs so hard and
so violently that his snake-like staff actually seemed to wriggle in sympathy.
When Goodman Brown and the old man meet an old lady along the way, the old man
put forth his staff, and touched her withered neck with what seemed the serpent's tail.
"The devil!" screamed the pious old lady.
She recognizes him not by his appearance, which of course can change, but by his staff.
When the old man throws his staff at Goodman Brown and then disappears, something strange happens. While he is walking, he gets weary and stops for a bit. Finally he grasps the
staff and set[s] forth again, at such a rate, that he seemed to fly along the forest-path, rather than to walk or run.
It is clear that Goodman Brown, by accepting the staff, is accepting his position as another of Satan's followers. After a shocking meeting in the forest in which he discovers all the people he had held in high esteem are cavorting with and worshiping the devil in the forest and he finally loses his own Faith, Goodman Brown wakes up and finds that
a hanging twig, that had been all on fire, [has] besprinkled his cheek with the coldest dew.
This "twig" is a real-world symbol of what has happened in Goodman Brown's apparent dream. The rest of his life, while not spent worshipping the devil, is a demonstration of the young man's loss of faith. He dies an old man and lives most of that time in a world without faith.
The staff, then, is a symbol representing the devil, and when the old man passes the staff to Goodman Brown and he accepts it, Goodman Brown has made his own pact with the devil.