In sentiment analysis using logistic regression, a model is trained using a labeled dataset of text and their corresponding sentiment labels. The model learns to classify new text based on the patterns in the training data. The model outputs a probability score between 0 and 1, which indicates the likelihood that the text expresses positive sentiment. A threshold is then used to convert the probability score into a binary classification label.