Apple's cables are known to yellow, due to their construction which contains no PVC...the cable's jacket is porous and will absorb and retain skin oils from your hands at the area where they're touched the most. Lightning cables are also *very* prone to this. Once the yellowing process has started, there is no way to stop the yellowing and eventual destruction of the cable jacket.
There is a way to repair them (assuming only the outer jacket is damaged and not the internal conductors) by using white heat-shrink tubing but that goes beyond a simple explanation here. (Google it).
If you can get it replaced, do so as it will just get worse over time. If it's under a year old, try to get it replaced by Apple (take it in to an Apple Store)