y = 12 is a line in which every point has a y-coordinate of 12 no matter what the x-coordinate is. That means that y = 12 is a horizontal line. The equation of line y = 12 can be written as y = 0x + 12 clearly showing m = 0 (slope is zero) and the y-intercept is 12. A line parallel to line y = 12 has the same slope, so its slope is also zero.
A line perpendicular to y = 12 is a vertical line. For a vertical line, the slope is undefined because it involves division by zero which is undefined in math.