To spill the beans means to divulge a secret. The phrase is believed to originate from ancient Greece, where votes were cast by the selection of either white or black beans. To spill the beans, then, would be to reveal your vote to others prematurely before the votes were tallied. I've also heard spill the beans used as a euphamism for vomiting and ejaculating (not at the same time)
Spill the beans is also a game where one person begins to tell a fictional story of any kind - scary, funny, or adventurous, the only limitation being the imagination of the story teller. When the person reciting the story says “Spill the beans!”, someone else must then continue where he left off. The narrator can change several times in the course of a story before it reaches it's final conclusion.