Citi interview question

How is the CAPM formula derived from regression analysis ?