A line is horizontal if and only if it is aligned parallel to the horizon:
Hence the adjective horizontally, meaning in a horizontal line.
A plane is horizontal if and only if it is perpendicular to a given vertical line.
The term the horizontal is frequently seen, particularly in the context of specifying the spatial orientation of a given (straight) line: the angle it makes to the horizontal.
It needs to be borne in mind that the terms vertical and horizontal are meaningful only in the context of an environment with a gravitational field, and therefore one where up and down have a meaning.
In the context of the presentation of mathematical graphics on, for example, a piece of paper arranged horizontally, the horizontal is that direction to the left and to the right of the reader. Thus such a direction would be actually horizontal if that paper were held in a vertical plane oriented for normal reading.
Computer screens are, in normal usage and to a first approximation, vertical planes already, so on such a medium, the terms are literal.
It is of course noted that it is difficult at this level to define vertical and horizontal without the definitions at some point becoming circular. An appeal to an intuitive understanding is therefore necessary to a certain extent.