The 'letter of the law' refers to the exact written words, or 'letter', of a law. The 'spirit of the law' is the meaning behind the law, or the reasons why the law was written. Imagine that you have been told you can't eat ice cream in the house. The letter of the law would be the words 'You cannot eat ice cream inside the house'. The spirit of the law might be to keep the house clean and free from messes.