It can be tricky. But knowing the reason behind it and motivating the child to tell the truth may be easy.
Is he/she is lying due to fear of punishment. Or has he/she made some big mistake which he doesn’t want to reveal. Present some facts before your child and make them realise they are lying. While talking to them, stay calm.
Encourage the truth always. Set some examples before them, be a role model for telling the truth.
Help your child to find ways to deal with certain behaviour they have not expected. Explain to them that lying can trap them in trouble someday. But truth always wins rather than having consequences. Praise them whenever they say the truth.
Make your child feel comfortable with you, be friends with them. Ask them to express their feelings and mistakes without any judgment, openly, all the time.
Fear of extreme consequences, children often tell lies. Don’t punish them harshly. Use constructive discipline via which the child will not be afraid.