Recent observations of jets from young stars indicate that the bright emission knots in these jets form at least in part because the jet varies in velocity and produces low-velocity shocks in the flow. In this paper we use a one-dimensional fluid dynamics code that includes detailed cooling by line emission to investigate how shocks develop and evolve in a variable wind. Supersonic velocity perturbations in a jet always steepen and form a pair of shocks (called the ''forward'' and ''reverse'' shocks), which separate gradually as the flow evolves. Line emission from the hot ps between these shocks has a low-excitation spectrum and large radial and tangential motions with respect to the exciting source, in agreement with observations of stellar jets. The forward shock has a larger shock velocity than the reverse shock if a density enhancement accompanies the velocity perturbation. If there is no initial density perturbation then the forward and reverse shocks have equal shock velocities, and if the density perturbation is negative (corresponding to constant mass loss) then the reverse shock has a larger shock velocity. In all cases except the constant mass-loss scenario the forward shock radiates more [S II] lambdalambda6716, 6731 emission than the reverse shock because the material that encounters the reverse shock must first pass through a rarefaction wave. The total [S II] emission produced by modest (approximately 40 km s-1) velocity perturbations rises rapidly as the shocks develop, and then either increases or decreases gradually (depending on the size of the perturbation) over tens of years. Models with strong magnetic fields have lower line fluxes and lower excitation than models without fields, and the perturbations disperse more rapidly if a magnetic field is present. Knots from variable stellar jets show how much the stellar winds change over time scales of approximately 10 years.