Perplexity of Language models

Can some one give (or refer) to a good explanation of Perplexity for language models.
Or asking it differently how algorithm Accuracy metric related to Perplexity?