Logistic regression models the probability of a binary outcome as a function of one or more predictor variables. The logistic function is used to map predicted values to probabilities, which ensures that the output is always between 0 and 1. The model estimates the odds ratios for each predictor, providing insights into their relative impact on the outcome.