How does LaTeX work?
When using text editing softwares like MS Word and OpenOffice, you write your text and use the toolbar to choose type of title, italic text, to insert lists or tables and other formatting. When printing your document, the printout will be identical to what you see on the screen. This is called "what you see is what you get".
Working in Overleaf is a bit different. You have two windows open, the first is for writing both commands to tell how you want your document to look like, as well as your text. This is called the source file. This is an ordinary text file with the format .tex. The second window displays a pdf-file. This pdf-file is the result of what you write in your source file. Some of what you write in the source file is displayed as normal text, some is displayed as headings, figures, and so on, and the rest is not shown at all, but adjusts some setting, e.g. the language or the paper size. This is called "what you write is what you mean".
The work flow in Overleaf is as shown in the figure below. You start writing in the source file and then check the result in your pdf. To update the pdf you click "recompile". You check the file and see if you are happy with it. Afterwords, you go back to the source file and make the changes you want, click recompile and check the result again. You repeat this process until your document is done. Does this sound complicated? It is easier to understand using an example, click the link beneath the figure to see how it works in Overleaf.
Click here to see an example in Overleaf!