An interesting fact is that the three altitudes always pass through a common point called the orthocenter of the triangle. See Orthocenter of a triangle
If a quadrilateral has a pair of parallel sides, both of them are called a base. In a similar way to triangles, the altitude of such a figure is the perpendicular distance from a base to the opposite side. Since they are parallel, either one will do.
Note: A common mistake is to use the length of the slanted side as the altitude. This is wrong. You must use the vertical distance as shown.