We derive octupole-level secular perturbation equations for hierarchical triple systems, using classical Hamiltonian perturbation techniques. Our equations describe the secular evolution of the orbital eccentricities and inclinations over timescales that are long compared to the orbital periods. By extending previous work done to leading (quadrupole) order to octupole level (i.e., including terms of order α3, where α ≡ a1/a2 < 1 is the ratio of semimajor axes), we obtain expressions that are applicable to a much wider range of parameters. In particular, our results can be applied to high-inclination as well as coplanar systems, and our expressions are valid for almost all mass ratios for which the system is in a stable hierarchical configuration. In contrast, the standard quadrupole-level theory of Kozai gives a vanishing result in the limit of zero relative inclination. The classical planetary perturbation theory, while valid to all orders in α, applies only to orbits of low-mass objects orbiting a common central mass, with low eccentricities and low relative inclinations. For triple systems containing a close inner binary, we also discuss the possible interaction between the classical Newtonian perturbations and the general relativistic precession of the inner orbit. In some cases we show that this interaction can lead to resonances and a significant increase in the maximum amplitude of eccentricity perturbations. We establish the validity of our analytic expressions by providing detailed comparisons with the results of direct numerical integrations of the three-body problem obtained for a large number of representative cases. In addition, we show that our expressions reduce correctly to previously published analytic results obtained in various limiting regimes. We also discuss applications of the theory in the context of several observed triple systems of current interest, including the millisecond pulsar PSR B1620-26 in M4, the giant planet in 16 Cygni, and the protostellar binary TMR-1.