This tutorial presents a systematic review of the study of polarization as manifested online, in particular on social media. In the first part, we clarify the concept of polarization, and the related nomenclature, by drawing from the social and political sciences. Then, we focus on the understanding of polarization as manifested online. In the second part, we review techniques for detection, quantification, and mitigation of polarization. Specifically, we show how content and network structure of social media can be used to these ends.