Artificial intelligence builds software for tasks we normally expect a person to do, and machine learning builds that software from examples. Take one simple junk filter. Its job is to sort each email into "spam" or "not spam" as it arrives. A person marks each email as "spam" or "not spam", and that mark is called a label. The junk filter is trained on these emails, then tested on emails set aside, which it has never seen. The software that is trained and tested using machine learning is called a model. In this example, the junk filter is the model. This junk filter keeps one number for every word on its list. These numbers are called weights. To judge an email, it adds up the weights of its words. If the total is above zero, it decides the email is spam. A model can be saved as a file. This junk filter's file holds its weights, and the calculation that uses them to judge an email.
Once machine learning has built the model, the model is put to work. A new email arrives. The junk filter decides whether it is spam. That is called inference. Inference is when a model uses what it has already learned to give an answer. In machine learning, training sets the weights, and inference uses them. In training, the junk filter guessed, checked each guess against the label, and adjusted its weights. In inference, no label comes with the new email, so the junk filter only guesses: it does not check, and it does not adjust. However many emails it judges, its weights and its saved file stay the same. To learn something new, it has to be trained again. Every trained model does inference when it is put to work. For example, when an iPhone unlocks with Face ID, a model that matches your face is doing inference. When Google Translate turns your sentence into another language, a translation model is doing inference. When YouTube suggests your next video, the model behind its suggestions is doing inference.
Another new email arrives that says "claim your free lunch". The weight of "lunch" is below zero, and it pulls the total down. The total is not above zero. So the model marks the email as not spam. A person sees the email and marks it as spam. The email and its label are stored as a new example. They are kept beside the model, and not in it. Later, the junk filter is trained again, on the training emails together with the new one. This round of training makes a new model, with new weights. The new model marks "claim your free lunch" as spam. For example, in Gmail you can report an email as spam. Google says Gmail's junk filter learns from what people do, such as marking an email as spam. It says that the more spam you report, the better Gmail gets at spotting similar emails.
For example, on a paid ChatGPT plan, you can choose a model, then type a question. The model takes in your question and gives back an answer: that is inference too. It uses weights that training has already set. OpenAI, which makes ChatGPT, describes some of its models as faster, and others as more capable. Many chat apps, such as ChatGPT and Gemini, have a setting that decides whether your chats may be used to train later models. OpenAI says that with ChatGPT's setting off, your new chats are not used to train its models.
Inference is when a model uses what it has already learned to give an answer. Inference uses the weights without changing them, and for this junk filter, a later round of training makes a new model. Each answer a chat app's model writes is inference, and in ChatGPT, one setting decides whether your new chats may be used in later training. When a product says it learns from you, ask when that training happens, and whether you can turn it off.