A generalised additive model (GAM) is a useful way of fitting "flexible" non-linear relationships between variables. GAMs are just an extension of generalised linear models (GLMs) and therefore provide much of the same functionality as GLMs, such as the ability to model non-normal data.
In this Stats Toolbox, Birgit Erni provides a quick introduction to GAMs and how you might fit these models in R.
Find Birgit's slides here.