Firstly it initiates the difficulty to be set to 2 and sets the maximum limit of difficulty to be 10.
While the difficulty is less then the maximum difficulty, it starts the PlayGameAtDifficulty function with the difficulty as a parameter.
Not sure exactly what std::cin does, but I think it resets the game after each round in order to increase the difficulty, therefore the ++difficulty line.
The last two lines of the code only happend if the condition for the while loop is not met, meaning the player has reached level 10 and it writes to the screen a message to the player.
I am pretty sure that return 0 means that it returns to line 0, meaning the code starts over from the beginning.