Pregunta de entrevista de Exponential AI

How does logistic regression work and what is its cost function?