  These notes are an extended version of a series of lectures given at the CIME
Summer School in Cetraro in June 2022. The goal is to explain questions about
optimal functional inequalities on the example of the sharp Sobolev inequality
and its fractional generalizations. Topics covered include compactness theorems
for optimizing sequences, characterization of optimizers and quantitative
stability.
