Generalized linear models are a set of techniques that generalizes the linear regression model (which assumes that the dependent variable is Gaussian) into a wide variety of distributions for the response variable. This response can no longer be Gaussian, but can belong to any distribution that is part of the so-called exponential family. In fact, there are many distributions that fall into this category, such as the binomial, gamma, Poisson, or negative binomial distributions. This fact allows us to work with a wide array of situations, such as with count data, or binary responses, and so on.
Generalized linear models (referred to as GLMs in the literature) are defined by three things: first, a linear predictor that relates the covariates with the response variable; second, a probability distribution for the dependent variable from the exponential...