Logistic regression is a classification machine learning algorithm that predicts categorical dependent variables. It works by training a model on labeled data to understand the relationship between independent variables and the target variable. The model uses a logistic function to output probabilities between 0 and 1, which can then be used to classify observations into categories. Some common applications of logistic regression include predicting if a user will pay for a streaming service, the likelihood of a sports team winning, or classifying text as positive or negative. It is a simple yet effective algorithm that is widely used as a baseline for performance comparison.