A context window is the maximum span of tokens a model can consider during one inference, including instructions, user input, retrieved material, tool results, and its own output. This guide explains the mechanism, trade-offs, evaluation, and controls that matter in practice.