Fundamentally, you have a threshold. Things above are classified as "positive" and below as "negative". At different threshold values, you get some number of correct positives (was actually positive) and false positives (was actually negative). That's what the ROC curve shows. You want the curve to be as close to the top-left (in this case) corner as possible.