In generalized linear models, a link function maps a nonlinear relationship to a linear one so that a linear model can be fit (and then mapped to the original form). For example, in logistic regression, we want to find the probability of success: P(Y = 1). This cannot be a linear function of any predictors (probabilities are bounded at 0 and 1), but the log of the odds of success, log(odds), can. After log(odds) is fit to a linear model, then it can be mapped back to probabilities. Log(odds) is the link function for logistic regression.