When you mark the assignments, you will likely want to hide the grades before you start marking, so that some students do not see their feedback before others.
When you have finished marking you will likely want to show the grades so that marks and feedback can be released to students.
Hiding and showing marks from inside the assignment
Open the assignment
In the Grading summary row click on the eye in the Grading visibility section to hide the grades
Click on the eye again to make the grades visible
Hiding and showing marks from inside the gradebook
Open Topic management
panel
Under topic administration click on Gradebook
Click on Setup tab
In the Actions column alongside the assignment, select the Edit link.
If the grades are visible, you will see an option to Hide them.
If the grades are hidden, you will see an option to Show them.
Assignments that are hidden will appear greyed out. Compare the two assignments below - assignment 1 is hidden from students, while assignment 2 is visible.