The term logistic regression can be deceptive. Because Actually it is classification model. We use logistic regression to solve problems like:

Emails are spam or not.

Online transactions are: fraudulent (yes/no)

Tumor: Malignant / Benign

Classification problems can be binary classification: that means the target value y is either 0 or 1. Generally, 0 represents the negative class and 1 represents the positive class. For instance, when classifying emails, if an email is a spam, the value of y may be 1 and y is 0 when it is not. So the value of y can be either 0 or 1 only. There is multiclass classification also where the value of y can be 0, 1, 2, 3, 4 and so on. But in this article, I am only focusing on binary classification. I will definitely talk about multiclass classification in future articles.