Reading documentation really helps (search for asymptotes). Also searching internet does. Little effort would lead to something like this:
Plot[(x^3 - 9 x)/(x^2 - 1), {x, -10, 10},
 Exclusions -> {-1, 1},
 ExclusionsStyle -> Dashed,
 PlotTheme -> "Detailed"]
