The example is like that of a football team who has made it to the final match. The opposing team is from far away and they have never met before. The coach drives 2 hours to go and see this team play. He starts to note down the things about the team such as the tricks and formations they use. The next day he gathered his team and told them everything about the opposition and what is the best way to defeat them.
Allah is the best example. He told us that in order to go to jannah we have to face an opponent. That opponent is shaytan.