We present spectra of the optical transient of GRB021004 obtained with the Hobby-Eberly telescope starting 15.48, 20.31 hours, and 4.84 days after the burst and a spectrum obtained with the H. J. Smith 2.7 m Telescope starting 14.31 hours after the burst. GRB021004 is the first afterglow whose spectrum is dominated by absorption lines from high ionization species with multiple velocity components separated by up to 3000 km/s. We argue that these lines are likely to come from shells around a massive progenitor star. The high velocities and high ionizations arise from a combination of acceleration and flash-ionization by the burst photons and the wind velocity and steady ionization by the progenitor. We also analyze the broad-band spectrum and the light curve. We distinguish six components along the line of sight: (1) The z~2.293 absorption lines arise from the wind of a massive star. For a mass loss rate of ~6 x 10^{-5} solar masses per year, this component also provides the external medium to create the afterglow light. (2) A second shell produces absorption lines with a relative velocity of 560 km/s, and this is associated with the shell created by the fast massive star wind blowing a bubble in the preceding slow wind at a radial distance of order 10 pc. (3) More distant clouds within the host galaxy lie between 30-2500 pc, where they have been ionized by the burst. (4-6) The massive star wind has clumps with radii and over-densities of 0.022, 0.063, and 0.12 parsecs and 50%, 10%, and 10% respectively. The immediate progenitor of the burster could either be a WC-type Wolf-Rayet star or a highly evolved star whose original mass was just too small for it to become a WN-type Wolf-Rayet star