When you go to a website, your computer talks to another computer called a server. Normally, the server sends back a bunch of files that your computer downloads and shows you as a website.
But sometimes, the server can also send you special instructions (called "code") that your computer can use to make the website better. This is called "code on demand."
It's like getting a recipe for a cake from someone. Instead of just giving you a pre-made cake, they give you the recipe so you can make your own cake whenever you want.
Code on demand is like getting a recipe for a website. The server can send you new code whenever it wants, so the website can change and improve without you having to download a whole new set of files. It's like magic!