Wolfram System notebooks are structured interactive documents that are organized into a sequence of cells. Each cell may contain text, graphics, sounds or Wolfram Language expressions in any combination. When a notebook is displayed on the screen, the extent of each cell is indicated by a bracket on the right.
The notebook front end for the Wolfram Language provides many ways to enter and edit the material in a notebook. Some of these ways will be standard to whatever computer system or graphical interface you are using. Others are specific to the Wolfram Language.
Once you have prepared the material in a cell, you can send it as input to the Wolfram Language kernel simply by pressing Shift+Return. The kernel will send back whatever output is generated, and the front end will create new cells in your notebook to display this output. Note that if you have a numeric keypad on your keyboard, then you can use its Enter key as an alternative to Shift+Return.
Most kinds of output that you get in Wolfram System notebooks can readily be edited, just like input. Usually the Wolfram System will convert the output cell into an input cell when you first start editing it.
There is no reason, however, that successive lines of input and output should necessarily appear one after the other in your notebook. Often, for example, you will want to go back to an earlier part of your notebook, and reevaluate some input you gave before.
It is important to realize that in most cases wherever a particular expression appears in your notebook, it is the line number given in In[n]:= or Out[n]= which determines when the expression was processed by the Wolfram Language kernel. Thus, for example, the fact that one expression may appear earlier than another in your notebook does not mean that it will have been evaluated first by the kernel. This will only be the case if it has a lower line number.
The exception to this rule is when an output contains the formatted results of a Dynamic or Manipulate function. Such outputs will reevaluate in the kernel on an as-needed basis long after the evaluation which initially created them. See "Dynamic Interactivity Language" for more information on this functionality.
As you type, the Wolfram Language applies syntax coloring to your input using its knowledge of the structure of functions. The coloring highlights unmatched brackets and quotes, undefined global symbols, local variables in functions and various programming errors. You can ask why the Wolfram Language colored your input by selecting it and using the Why the Coloring? item in the Help menu.
If you make a mistake and try to enter input that the Wolfram Language kernel does not understand, then the front end will produce a beep and emphasize any syntax errors in the input with color. In general, you will get a beep whenever something goes wrong in the front end. You can find out the origin of the beep using the Why the Beep? item in the Help menu.