How do you find the slope of a line y=5?

You could re-write the given equation $y = 5$ in slope-intercept form as
$\textcolor{w h i t e}{\text{XXXXX}}$$y = 0 \cdot x + 5$ with a slope of $0$ and a y-intercept of $5$.
or you could simply recognize this equation as a horizontal line with slope of $0$