How can I deal with the discomfort that exercise can cause?

What discomfort? It is not clear what you are asking. Is this discomfort during activity, after activity? Where is it and what dies it feel like? You should see a physician for this discussion.
Ice, stretch, advil (ibuprofen) I assume we're talking about joint or muscle discomfort arising when you finish exercising, or maybe in the days following a new increase in exercise. Icing the area keeps it from swelling, as does taking ibuprofen. Stretching as part of your cool down and a few hours later keeps the tendons from tightening the muscles further. Best cure for post exercise muscle pain is regular exercise.