1. Draw a triangle ABC
2. Set the compass width to the length of any side (or shortest). Let BC be the shortest side.
3. From B, draw an across the opposite side(CA).
4. Label this point as F.
5. Similarly draw an arc from C to the opposite side AB.
6. Mark it as P.
7. Set the compass width more than half of the distance to P
8. From B and P draw two arcs which intersect at Q.
9. Then join CQ and CQ is the altitude from C to the side AB.
10. Set the compass width more than half of the distance to F.
11. From C and F draw two arcs which intersect at R.
12. Then join BR and BR is the altitude from B to the side AC.
13. The point where the two altitudes CQ and BR intersect is the orthocenter of the triangle.
(Note: You may need to extend the altitude lines so they intersect if the orthocenter is outside the triangle)