system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does MVC programming work?

Hi! I just started using codeigniter and I love it! I have programmed in php for a long time, but simple things. Now I am tasked with a big project and CI will help... Only I can't seem to wrap my head around MVC programming. I know what code to write, but I usually don't know where to put it.
gpt
The M stands for model. This is where you create a data 'model' of the problem you are working on. You might have a user and that user has certain data related to it like a name and an address and a password. That user might have a 'shopping cart'. There might be many 'items' for sale. You want all of this code to reflect something about reality, but it isn't involved with how to interact with the user.

The V stands for view. This is how the data from the model gets presented to the user. There might be many different views for the same underlying data. All the view needs to know is that it will get model data somehow and then turn that into a data structure which will be delivered to the user. This might be a web page, a JSON object, calls to a graphics API, or something else completely.

The C stands for controller. It's involved with taking input from the user, interacting with the model to get some data, managing delivering that model data to a view, then handing the view back to the user.

MVC is about separating concerns, in this case it separates persistent data (model), creating data for the user (data), and responding to user input (controller).