What is to encode?

Some of the messages, especially during war, are written or transmitted in code words. To encode means to find out the formula to understand those messages. To find out the meaning of the coded messages or writings.