Logistic regression is a classification algorithm that draws a decision boundary line to split data into classes. It is similar to linear regression but predicts probabilities rather than numbers, such as predicting a 90% chance an object is a grapefruit. The algorithm finds the line that best splits the data based on classes, using an activation function to output probabilities rather than values like linear regression.