The formal problem studied in this paper is that of the response of a neutron star to a perturbation in its temperature. It is found that this response is very rich and embraces a wide variety of phenomena. Under certain circumstances the response will be a period jump (a glitch). Detailed numerical integrations are presented which show behavior indistinguishable from the Vela pulsar period jumps. The theory can be made to yield jumps as large as Vela's or as small as the Crab's. It also quite naturally accounts for the observed increase in slowing-down rate, and its subsequent slow decay, after a jump. Finally, there appears to be no reason why these events cannot be arranged to recur every few years. This theory of pulsar glitches makes three predictions which can be observationally tested: that glitches take time to build up, that they are accompanied by a modest heating of the star, and that the time scale for the postglitch decay need not be the same in successive jumps of the same pulsar. Occasional large perturbations to pulsar temperatures yield glitches; more frequent (and random) smaller perturbations, or large perturbations to higher temperatures, yield pulsar timing noise. It is shown that in the limit of high temperatures-i.e., young pulsars-the response to this process will have the statistics of a random walk in the frequency, and in the limit of low temperatures-old pulsars-a random walk in the slowing-down rate. The general case, however, is not described by either of these models. The theory makes a prediction that can be observationally tested: that the pulsar angular velocity can only increaase as a result of a perturbation. The noise process therefore does not have zero mean. The theory also predicts the existence of a phenomenon that has not yet been observed: a giant period jump associated with a giant thermal instability. The X-ray signature of this phenomenon has the characteristics of certain of the X-ray novae. The instability may also have bearing on the absence of long-period pulsars and the uncomfortably large pulsar birthrate derived from pulsar statistics. Subject headings: pulsars - stars: interiors - stars: neutron - X-rays: sources