From Stanford Encyclopedia of Philosophy, published on Dec 12, 2016:
“The first sentence in this essay is a lie. There is something odd about saying so, as has been known since ancient times. To see why, remember that all lies are untrue. Is the first sentence true? If it is, then it is a lie, and so it is not true. Conversely, suppose that it is not true. We (viz., the authors) have said it, and normally things are said with the intention of being believed. Saying something that way when it is untrue is a lie. But then, given what the sentence says, it is true after all!
That there is some sort of puzzle to be found with sentences like the first one of this essay has been noted frequently throughout the history of philosophy. It was discussed in classical times, notably by the Megarians, but it was also mentioned by Aristotle and by Cicero. As one of the insolubilia, it was the subject of extensive investigation by medieval logicians such as Buridan. More recently, work on this problem has been an integral part of the development of modern mathematical logic, and it has become a subject of extensive research in its own right. The paradox is sometimes called the ‘Epimenides paradox’ as the tradition attributes a sentence like the first one in this essay to Epimenides of Crete, who is reputed to have said that all Cretans are always liars. That some Cretan has said so winds up in no less a source than New Testament!*
Lying is a complicated matter, but what’s puzzling about sentences like the first one of this essay isn’t essentially tied to intentions, social norms, or anything like that. Rather, it seems to have something to do with truth, or at least, some semantic notion related to truth. The puzzle is usually named ‘the Liar paradox’, though this really names a family of paradoxes that are associated with our type of puzzling sentence. The family is aptly named one of paradoxes, as they seem to lead to incoherent conclusions, such as: “everything is true”. Indeed, the Liar seems to allow us to reach such conclusions on the basis of logic, plus some very obvious principles that have sometimes been counted as principles of logic. Thus, we have the rather surprising situation of something near or like logic alone leading us to incoherence. This is perhaps the most virulent strain of paradox, and dealing with it has been an important task in logic for about as long as there has been logic.
In this essay, we will review the important members of the family of Liar paradoxes, and some of the important ideas about how these paradoxes might be resolved. The past few thousand years have yielded a great number of proposals, and we will not be able to examine all of them; instead, we will focus on a few that have, in recent discussions, proved to be important…”
*St. Paul’s epistle to Titus 1:12