Polarized proton-proton collisions at the Relativistic Heavy Ion Collider (RHIC) provide unique opportunities to study the spin structure of the nucleon. We will highlight recent results on the nucleon spin structure from the STAR and PHENIX experiments at RHIC: (1) A sizable gluon polarization in the proton is measured with longitudinal double spin asymmetries of jet and hadron production; (2) Longitudinal single spin asymmetries in W boson production improve constraints on the sea quark polarization. The new spin asymmetry results for W boson confirmed the SU(2) flavor asymmetry of the light sea quark polarization in the proton; (3) Transverse spin effects in hadronic systems offer new implications on parton distribution functions in the collinear and transverse momentum dependent frameworks. We will also discuss near term plans for the STAR forward detector upgrade and prospects for proton-proton and proton-ion collisions in the years beyond 2021 at STAR.