In astronomy, geography, geometry and related sciences and contexts, a direction passing by a given point is said to be vertical if it is locally aligned with the gradient of the gravity field, i.e., with the direction of the gravitational force (per unit mass, i.e. gravitational acceleration vector) at that point. In general, something that is vertical can be drawn from up to down (or down to up), such as the y-axis in the Cartesian coordinate system.
Although the word horizontal is common in daily life and language (see below), it is subject to many misconceptions. The concept of horizontality only makes sense in the context of a clearly measurable gravity field, i.e., in the 'neighborhood' of a planet, star, etc. When the gravity field becomes very weak (the masses are too small or too distant from the point of interest), the notion of being horizontal loses its meaning.
The concept of a vertical line is thus anything but simple, although, in practice, most of these effects and variations are rather small: they are measurable and can be predicted with great accuracy, but they may not greatly affect our daily life.
This dichotomy between the apparent simplicity of a usual concept and an actual complexity of defining (and measuring) it in scientific terms is because the typical linear scales and dimensions of relevance in daily life are 3 orders of magnitude (or more) smaller than the size of the Earth. Hence, the latter appears to be flat locally, and vertical directions in nearby locations appear to be parallel. Such statements are nevertheless approximations; whether they are acceptable in any particular context or application depends on the applicable requirements, in particular in terms of accuracy.