In a nutshell
Logistic regression sorts things into two classes and reports how sure it is, not just yes or no. It scores each point by which side of a line it's on, then runs that score through the S-shaped sigmoid to get a probability between 0 and 1; training slides the line to make those probabilities match the real labels.