When all a course steps are done ("passed") then a course is marked as completed.
Reverting course completion:
Should you wish to revert the completion of a student's given course for some reason, find the course on the enrollments page (probably need to select "Completed" and enter some date filter(s)), and, as long as "Status" viewing is turned on, select "revert".
Course Completion:
When you are ready you can then mark the course completed again by finding the course again (now it will mostly likely be under "Active"!) and this time selecting "complete".