Answer
The algorithm calculates a weighted sum of the input features and passes it through a function called the sigmoid, which converts the result into a probability between zero and one.
Real-world example An email service uses logistic regression to estimate the probability that a message is spam, then marks it as spam if that probability is above a chosen threshold.