To set up your gradebook, go to the Administration menu on the left and click Gradebook Setup in that menu. Everything discussed below starts on the Gradebook Setup page.
You can also get to Gradebook Setup by clicking on Grades in the Navigation menu on the left, and then selecting Gradebook Setup from the dropdown menu of gradebook views.
When you add activities such as Assignments or Quizzes to a Moodle course, corresponding grade items (columns) are added to the course gradebook. Moodle also lets you manually add grade items to your gradebook to record grades you may not have collected in Moodle, such as the grades for a midterm or for a project that was submitted offline. It allows you to define categories, for assignments that are similar in nature such as quizzes or homeworks.
It's fine to build your gradebook as you go, but you should set up categories for items that will be treated similarly, such as homeworks and quizzes, as early as possible, so that you can easily make certain that they contribute to the final grade in the way that you want. For example, say a professor is going to base their final grade on these types of work:
Pre-class quizzes: 15%
Research paper: 30%
Final exam: 20%
This professor will want to define a category for pre-class quizzes and a category for homework, while the midterm, research paper, and final exam are single items.
You may already list what each type of work will contribute to the final grade, in your syllabus, and you can use this as a guide when setting up grade categories.