666 is the number of the beast (often identified with Satan), which is mentioned in the Book of Revelation 13:18. The derivation of the number comes from the original Greek manuscripts of the Bible, where letters could be used as numbers (as with Roman numerals).
A common misconception is that 666 refers to three consecutive instances of the number 6 (6-6-6), when in fact it refers to the number six-hundred and sixty-six (600-60-6). In Greek this was written as χξς᾿ (Chi-Xi-Digamma). Some sources confuse the final or parsing Sigma (written ς), technically called a lunate Sigma, with the Digamma (modernly written as the ligature ς᾿ or Ϛ, but originally ϝ). It was actually Digamma that represented 6, not Sigma. (In Hebrew 666 is normally written תרסנ)
Several early manuscripts actually write out the number "six-hundred and sixty-six" (ἑξακόσιοι ἑξήκοντα ἕξ) at Revelation 13:18, which is how the number is written in the Septuagint (1 Ki. 10:14, Ezra 2:13). Modern eclectic editions of the Greek New Testament use this form of writing the number.
The Preterist interpretation views Revelation as an allegory or prophecy of 1st century events, especially the Great Jewish Revolt and the beginning of Roman persection of Christians. Some preterists identify 666 with Roman Emperor Nero.