We present spatially resolved X-ray spectroscopy of PSR B1951+32 and its pulsar wind nebula ( PWN ) in supernova remnant ( SNR ) CTB 80 using a Chandra observation . The Chandra X-ray map reveals clearly various components of a ram-pressure confined PWN embedded in the SNR ejecta : a point source representing the pulsar , X-ray emission from the bow shock , a luminous X-ray tail , a 30 \arcsec diameter plateau whose northwestern part is absent , and the outside more diffuse X-ray emission . The plateau is just surrounded by the radio , [ O III ] , [ S II ] , and [ N II ] shells , and the outside diffuse emission is mostly within the H { \alpha } shells . While the spectra of all the features are well fitted with power law models , a power law plus blackbody model can fit the spectrum of the pulsar significantly better than using a power law model alone . Generally the spectra of these components obey the trend of steepening from the inside to the outside . However , the edge of the plateau probably has a harder spectrum than that of the central region of the plateau . The cause of the apparent hard spectrum of the plateau edge is unclear , and we speculate that it might be due to a shock between the PWN and the SNR ejecta . The possible blackbody radiation component from the pulsar has a temperature of 0.13 \pm 0.02 keV and an equivalent emitting radius of 2.2 ^ { +1.4 } _ { -0.8 } ( d/2 kpc ) km , and is thus probably from the hot spots on the pulsar . We also show in this paper that the blackbody temperature of the entire surface of PSR B1951+32 is much lower than those predicted by the standard neutron star cooling models .