I will use your animated image to illustrate the calculation. So, the table from the right side contains 20 data instances. These instances are indexed by their rank when ordered by the value from the third column, called score. Now, what is that score? Let's suppose that we have two classes/labels, named $1$ and $0$. That score is a numerical value which resembles the probability that that instance to be of class $1$. Because ROC curves deals only with binary case (I know there are extensions, but it does not matter here), than the probability that the same instance to be classified as the label $0$ is $1-Score$. The second column tells us which class the specific instance actually is considered.
Usually, if the scores resembles probabilities (as I considered, and if it is not the case, one can easily transform scores to range $[0,1]$ to look like probabilities), a classifier predict an instance as class $1$ if the score for class $1$ is greater than the score for class $0$. If the sum of the scores is $1$, as I supposed, than is easy to see that this condition is the same as: predict an instance to be of class $1$ if score of that instance is greater than $0.5$. The main idea is that it uses a threshold value to discriminate in order to predict.
Now that we clarified what that information is we develop the idea behind ROC curves. ROC curves tells us how the classifier would behave for all useful values of the threshold, not only for the arbitrary value $0.5$.
It starts from the threshold value of $1$ and drops incrementally until $0$. But which are the useful values for the threshold? For the threshold value of $1$ would give $TPR=0$ since no value from Score column is greater than $1$, and similarly $FPR=0$. One can note also that the threshold value of $0.95$ gives the same amounts. More, all the values of the threshold between $1$ and $0.9$ give the same values. The conclusion is that the only useful values for the running threshold are the distinct values from score column. So the ROC curve points will be computed only for those distinct values of score.
One step further is to consider the threshold value of $0.9$. The $TPR =0.1$ because from all the $P=10$ instances which are labels actually as positive, only $TP=1$ has the score greater than the threshold values and is predicted as positive. You can follow wikipedia page and compute the same value for $FPR$.
After doing that, you will obtain the coordinates of a point which will be part of the ROC curve. Then you peek the next increasing value of the threshold from all the useful values and repeat the algorithm. Finally you will end up in the right corner where all the actual $1$ instances are predicted as $1$ (TPR=1) and all the actual instances $0$ will be also predicted as $1$ and (FPR=1), the final point and the end of the ROC curve.