Imagine you have shoeboxes on a shelf, and you write a name on each one with a marker. On one box you write "snack" and inside you put an apple. Later, when you want to know what your snack is, you do not have to remember which shelf or which corner; you just look for the box named "snack" and see the apple.
Computer programs work the same way. You tell the computer "the box called snack holds an apple," and after that you can just say "snack" and the computer knows you mean the apple. If you put a banana in that box instead, the box name stays the same but what is inside changed. A program is a to-do list of things like that: put something in a box, look in a box, swap what is in a box, and tell me what you found.