why the line x= 4 is a vertical line

Because x has to be 4 and y can be any number. That defines a vertical line through x=4. This assumes that x is the horizontal axis, and y is the vertical axis, as is usually the case.