cin captures user input from the keyboard. There are other operations that are used to capture data in other interesting ways.. but cin just gets a hunk of data (up to the first space) and puts it into the variable you give it.
if the variable number is an int, then cin >> number gets user input from the keyboard and tries to put it into the int number variable. If the user has entered something other than an int, then cin throws an error, which is detected with the if evaluation.