A vertical line has an undefined slope, while a horizontal lines has a slope of zero. If you think about a zero slope as walking across a flat street, then a vertical line might imply that you would have to walk straight up into the air, which is impossible (slope is undefined).
So we write the equation of a line with an undefined slope as y= a number.
For your problem, we would say y= 0 as the equation of the line (or the y coordinate of your point).
This is also the equation for the y axis on a coordinate plane.