  The large center of mass energy and increasing statistical precision for a
wide range of hadronic final state observables at the HERA lepton-proton
collider has provided a detailed testing ground for QCD dynamics. Fully
flexible next-to-leading order calculations are mandatory on the theoretical
side for such tests and will be discussed in detail. Next-to-leading order QCD
predictions for one- and two-jet cross sections in deep inelastic scattering
with complete neutral current ($\gamma^\ast$ and/or $Z$) and charged current
($W^\pm$) exchange together with leading order results for three- and four-jet
final states are presented. The theoretical framework, based on the phase space
slicing method and the use of universal crossing functions, is described in
detail. All analytical formulae necessary for the next-to-leading order
calculations are provided. The numerical results are based on the fully
differential $ep \to n$ jets event generator \docuname which allows to analyze
any infrared and collinear safe observable and general cuts in terms of parton
4-momenta. The importance of higher order corrections is studied for various
jet algorithms. Implications and comparisons with (ongoing) experimental
analyses for jet cross sections at high $Q^2$, the determination of
$\alpha_s(\mu_R)$, the gluon density, power corrections in event shapes and the
associated forward jet production in the low $x$ regime at HERA are discussed.
A study of jet cross sections in polarized electron and polarized proton
collisions shows that dijet events provide a good measurement of the polarized
gluon distribution $\Delta g(x_g)$, in a region, where $x_g \Delta g(x_g)$ is
expected to show a maximum.
