In plain terms: look it up, then write. The “retrieval” step searches a collection, such as help articles, website pages or past emails, for the pieces most related to the question. The “generation” step hands those pieces to the model together with the question, so it writes from them instead of from memory.
Why it matters
RAG is why an AI tool can answer questions about your business without being trained on it. It also explains most of its failures. If the search step finds the wrong article, or nothing, the model writes from whatever it got. So answer quality depends as much on the quality and freshness of your sources as on the model.
Many tools add more than one lookup, or let the system search again when the first results do not answer the question. The principle stays the same.
An example
A customer asks how long a refund takes. Retrieval finds the refunds article and a past reply that mentions bank processing times. The model writes a reply that combines the two and can point to both.
The broader idea is grounding.