The full story in a nutshell is that Jesus went to Gethsemene(?) where he came upon a possessed man who had been banished from the town. Jesus asked the demon possessing him his name (apparently this gives power over possessing demons; see The Exorcist and The Devils of Loudon) and he gave the reply 'Legion,' blah blah blah. A herd of pigs was grazing nearby, so Jesus made the many demons leave the man and enter the pigs, who promptly ran into the lake and drowned themselves. The end (for the pigs, anyway).