The strcmp function is from the string library. It takes two arrays of characters as input and compares them. In our case we wish to compare the string the user entered, which is given as the return value of the function fgets, with the string "quit\n", which is what the user will enter if they want to quit the program. The way strcmp works is to return the value 0 if the strings are identical and something else otherwise.
We want our program to keep getting strings of data from the user until they type in quit, therefore we compare the input string with quit\n and check that strcmp returns a non-zero value, i.e. we check that the strings are not the same, that is, the user has not yet input a quit. While this condition remains true, the while statement will continue looping, getting input from the user, checking whether they have entered quit and executing the statements between the curly braces that follow the while statement.