Discovering how to be deceptive is common in the preschool child as this is often the point when they develop Theory of Mind (an understanding that different people can have a different understanding of the same event - the link has an article about the development of this in Asperger's kids, but I thought the cartoons contained within are some of the best for demonstrating how Theory of Mind works). I think it is unlikely your child is truly lying with a full understanding of what it is she is doing. She may be transferring another experience and just mimicking tha t other experience in a confusing to you and inappropriate way, who knows really. You might try out the "test" offered in the cartoon on the Theory of Mind Link to reassure yourself whether your child is likely lying or somehow being confusing.
Most kids don't really fully obtain the capacity to lie until well into their third of fourth year, but since it is a developmental milestone and not an age marker - it really depends upon the child when this truly begins. Since they aren't fully logical yet, it is really difficult for a preschooler to understand long - term consequences and benefits of anything let alone when it is something that seems beneficial in the short term which makes it pretty difficult to discipline for lying. If you decide it is possible your child is purposefully lying to you and it continues to come up or be a problem, I have included some additional ideas for you.
Preschoolers and other young children (Toddler - Early Elementary) don't typically have a lot of experience with the contrast between trust or lack-of-trust. Hopefully, most of the people they encounter are pretty trustworthy most of the time. The idea of trustworthiness as compared to a lack of trust is usually novel to them. This was something we really struggled with Alice (my daughter) on for awhile between the ages of three and four - and although she is honest most of the time, there are still times she is certainly tempted.
Certainly an average eight-year-old, should be able to understand the basic concepts of deception and trustworthiness. However, at the age of two if they are purposefully grasping exactly what they are doing, they probably do not understand the real-life consequences of their choice and are really experiementing with a new skill - which is part of how they learn about it. I often find it best when there is a "new problem" with kids at these earlier ages to talk about the concept through characters in stories in order to remove it from being too personally close and get at the heart of why the behavior is a problem before linking directly to the child's own choices.
For a child that is an auditory learner and relates well to stories, two classics to take a look at are: "The Boy Who Cried Wolf" and "Pinnochio". My own little one was still unable to explain why other characters in a variety of modern takes on a "Boy Who Cried Wolf" as well as the original did not go to the boy's aid at the end of the story right up until around age five.
In order to teach the concept of "trustworthiness" and how easy it is to lose the status of being trustworthy, I found a suggestion where family members take one another for "trust walks" online and laughed at myself for not having thought of it on my own because it was something I did almost every year with my middle-schoolers. You know, you pair up and one member is blindfolded and then you trade. Go through the exercise and be trustworthy, but then ask of the child (children), "how would you have felt if I had . . . " and then fill in with an untrustworthy action. You could trying throwing in one untrustworthy action during a second round with the activity if you think they really need the point driven home hard. When we finally did this activity a few years ago, the difference between before the trust walk and after was dramatic. It really sent the message home in regard to what her daddy and I had tried to express to her so many times before.
Once the concepts of trustworthiness and honesty are understood fully in a more personal way, many families, including ours, use the "second consequence" tact. The idea is that there is a second consequence added onto any original consequence that would have existed without the lie. When children know this is coming it can be a good deterrent to lying. We also continue to discuss how important trust is and remind about the natural consequence of "loss of trust" whenever this "second consequence" must be used. As often as is possible, there is a third "consequence" that drives this point home soon after a situation where a lie has been used. For example, "no, you can't go to your friend's house because I can't trust you to clean up your messes without me watching over you. That means I can't trust you to help clean up your messes while at your friend's house where I can't check on you as much." (when a child has claimed to have cleaned something up that didn't really get cleaned) "I guess you'll have to work on earning back more trust by being more honest".
I feel the more ways the discussion can be had and the topic can be addressed, the sooner and more fully the importance of trustworthiness and how to maintain it will be understood. I do know this will be an "on going" discussion in any household as the temptations simply become greater as they continue to get older.
Since we were having all the trouble with lying, we have also worked with a book titled, "E Is for Ethics" by Ian James Corlett. It is a wonderful book with many more subjects than honesty and trust (but these two subjects are addressed as individual subjects as well) Each chapter begins with a story that is basically a kid- sized conundrum about what the right thing to do is. The book sets up the story and then gives guides for how to go about discussing the best outcome with your kids.
Just remember, lying is a natural thing for kids to try out a few times. The fact that they've lied a few times, doesn't make them a bad kid - its just an opportunity to learn and practice better choices and habits. What will help your kid most is if you stay calm, don't worry about it too much but apply appropriate consequences and apply them consistently.