Spies in the Revolutionary war did not have the fancy Aston Martins and other gadgets popularized in James Bond films. They had to use more basic technologies, like invisible ink.
There are quite a few ways to use invisible ink, and the clever Revolutionary War spies had a very interesting method. They would use lemon juice or various chemicals. Then, they would write an ordinary letter and write their secret info between the lines with the chemical or lemon juice instead of ink. To read the letter, the recipient would immerse it in a chemical bath or hold it up to the heat.
Another method used by Revolutionary war spies were codes or ciphers. These have been used in many wars. In essence, a code or cipher is a way to conceal information so that only certain people can understand it. A good example of a cipher in the Revolutionary war was the one used by Benedict Arnold. He used the book "Blackstone's Commentaries on the Laws of England" or "Nathan Bailey's Dictionary". Arnold would find the word he wanted to write in his letter in one of these books and then write down the page number, line number, and word number of the word in the letter. Then, the person with the key could look up the word in his copy of the book and read the letter.