Context window: what the model can use right now
A context window is the token capacity available to a model for a request. In a causal language model, the supplied context and the generated continuation share that capacity. Instructions, conversation history, retrieved passages and tool results all take space. Images and other modalities also consume model-specific context capacity.
This is different from knowledge learned during training. The weights can encode patterns from a vast corpus, but a detail from your conversation must be present in the current context or supplied through some external memory mechanism for the model to use it reliably.

Capacity is only the first question
A larger window lets more material enter the computation. It does not guarantee that the model will find every relevant detail or combine them correctly. The paper *Lost in the Middle* demonstrated that answer quality could depend strongly on where evidence appeared. A useful long-context evaluation therefore changes both the amount of material and the location of the answer.
Keeping a conversation going
When history grows, an application can remove old turns, summarize them or retrieve selected passages. Each approach changes what the model actually receives. A summary can preserve decisions while losing an exact quotation; retrieval can recover the quotation when needed.
KV caching reuses computation for context that remains present. It does not enlarge the window. RAG chooses information to put into it. Those solve different problems: reusing work and selecting evidence.