The text you are editing in Emacs resides in an object called a buffer. Each time you visit a file, a buffer is created to hold the file's text. Each time you invoke Dired, a buffer is created to hold the directory listing. If you send a message with C-x m, a buffer named ‘*mail*’ is used to hold the text of the message. When you ask for a command's documentation, that appears in a buffer called ‘*Help*’.
Each buffer has a unique name, which can be of any length. When a buffer is displayed in a window, its name is shown in the mode line (see Mode Line). The distinction between upper and lower case matters in buffer names. Most buffers are made by visiting files, and their names are derived from the files' names; however, you can also create an empty buffer with any name you want. A newly started Emacs has a buffer named ‘*scratch*’, which is not associated with any file and can be used for evaluating Lisp expressions in Emacs (see Lisp Interaction).
At any time, one and only one buffer is current. This is also called the selected buffer. We often say that a command operates on “the buffer”; this really means that the command operates on the current buffer (most commands do). When there is only one Emacs window, the buffer displayed in that window is current. When there are multiple windows present, the buffer displayed in the selected window is current. See Windows.
Each buffer records individually what file it is visiting (if any), whether it is modified, and what major mode and minor modes are in effect (see Major Modes). Any Emacs variable can be made local to a particular buffer, meaning its value in that buffer can be different from the value in other buffers. See Locals.
A buffer's size cannot be larger than some maximum, which is defined by the largest buffer position representable by the Emacs integer data type. This is because Emacs tracks buffer positions using that data type. For 32-bit machines, the largest buffer size is 256 megabytes.