The altitude of a triangle is the segment from the vertex of the triangle and perpendicular to the opposite side.
Altitude of an acute triangle

In an acute triangle, all the altitudes are internal. That is, they lie wholly within the triangle.
Altitude of a right triangle

For a right triangle, two of the three sides (shown in red) are actually the altitudes of the triangle. One of the three altitudes lie inside the triangle.
Altitude of an obtuse triangle

When the triangle is obtuse, two of the altitudes lie outside the triangle and one of the three lie inside. Obtuse triangles have two external altitudes and one internal altitude.
Notice that we had to extend the base before drawing the altitude!