Programming a game involves several phases: setup, running the game, listening for user input and enemy movement, handling world events, and tracking state changes. It is like following a recipe by defining variables for data like eggs and sugar, and functions for actions like whisking and baking. JavaScript and Canvas allow drawing on a web page, like loading an image for a player ship and painting a background. The next step is adding movement to the space game.