If you mean 'why are there devils' then devils were created by an obsession for power. The first devil was supposedly an angel called Lucifer who then tried to destroy God and become powerful himself. This was the origin of human sin.
The first episode of Code Lyoko is called Teddygodzilla. There is a 2-part prequel called Xana Awakens which people sometimes mistake for the first episode but it isn't. It is good to watch that as it explains a lot of the series.