A coupon bond is really a bundle of zero-coupon cash flows, and each one should be discounted at the rate appropriate to its own date. Those per-date rates are spot rates, and the set of them is the zero-curve.
yield-to-maturity is a blended average of the spot rates that apply to a particular bond's cash flows, which is why two bonds maturing on the same day can have different YTMs if their coupons differ. Spot rates remove that distortion.
Example: the 1-year spot is 4.8% and the 2-year spot is 4.5%. A 2-year 5% annual coupon bond is worth 50 / 1.048 + 1050 / 1.045^2 = 47.71 + 961.44 = 1009.15 per 1,000 face.
Related: forward-rate, bootstrapping, zero-curve, zero-coupon-bond, yield-to-maturity