On the relation between $\infty$-categories and model categories