"You're home late." said Jill to John, with just a hint of a question in her voice. "Yeah, I had to work longer today... oh, and then I had a beer with Tom after work." That, however, was a lie. In truth, John had been shopping in a jewelry store. (Though whether he was buying something for a mistress, or rather a surprise wedding day present for Jill, I'm not going to tell you; and so you'll never find out.)
Lying means saying something that you think to be untrue, while assuming at the same time that the people you're talking to take the conversation to be truthful. Everyone, that is, believes that what is said is what the speaker takes to be true (to the best of their knowledge). Lying is a conversational move that breaks the rules of the game, with everyone else still thinking those rules in force.
It only works because we have the ability to claim something although we silently think to ourselves that it is not the case; something else is. In the story fragment above, John gives an account of his activities that evening which he knows is not accurate. He keeps to himself what he knows to be the true version, and makes up another version (plausible enough to be a candidate for the truth, as far as Jill can tell) which he then entertains.
This juggling with two versions is a characteristic that lying shares with other ways of generating unreality. Think of 'what-if' scenarios: "What if they don't have this reference book at the public library?" — "Well, then we'll have to buy a copy at the bookstore." Here the assumption is (presumably) that the book is in fact at the library, but that assumption is suspended for the time being, to discuss the options in the hypothetical case in which it isn't. We pretend, for the sake of that discussion, something to be the case that we think is probably not so; after we're done with sorting out the options, we then switch back to 'realistic' mode.
This connects to the interplay between reflection and imagination I've sketched previously. When making up versions of what we think to be true (or likely to be true) in lying or scenario discussion, we're in imagination mode: we generate unreality. Being truthful or realistic, on the other hand, is reflection mode: we keep as close to reality as possible (we might still be mistaken about what's the case, but that doesn't make us less truthful or less realistic; it just makes us unsuccessful in being epistemically right).
What is special about lying, however, is the one-sided breaking of the rules I've mentioned above. When looking at scenarios, usually everyone involved in the conversation is aware that imagination is in play; when someone is telling a lie, the intent is precisely to create an asymmetry in this regard. From this difference, a difference in moral evaluation might be derived: lying is considered as morally wrong, whereas scenario discussion is not. (Exactly how the moral wrongness of lying is derived is of course another topic for extensive discussion.)
 See Don Fallis, "What is Lying?", Journal of Philosophy 106 (2009), 29–56; James Edwin Mahon, "Lying and Deception" at the Stanford Encyclopedia of Philosophy; Thomas Carson, "The definition of lying", in Nous 40 (2006), 284–306.