Representations of $p$-adic groups and affine Hecke algebras