Painful sensations in muscles after training or heavy physical exertion are otherwise called "DOMS". This effect can occur approximately 10-20 hours after exercise and disappear only after two to three days. "DOMS" is a post-workout state that is familiar to those who exercise quite rarely or to those who resume physical activity after a long break. It is impossible to prevent the appearance of such an effect, but you can reduce the pain.
Firstly, if you experience pain, do not stop subsequent workouts, even if you absolutely do not want to go to them with an aching body. Of course, it is not necessary to perform the same amount of exercise, you can slightly reduce it. However, you should not completely abandon everything, otherwise you will never get rid of "DOMS".
Over time, you can make the load more intense, but do not forget that your muscles also need rest, time to recover. Take an example from professional athletes: they train intensively once or twice a week, the rest of the time a fairly moderate exercise regime is observed. World-class marathoners, for example, only train fast runs twice a week, and weightlifters lift very heavy weights once every two weeks.
There are some fairly simple ways that you can get rid of or at least relieve muscle pain. To begin with, you must protect the muscles from further damage, give them rest, apply ice to the injured areas of the body, and then fix the damaged areas with elastic bandages and provide such places with an elevated position to avoid the appearance of swelling.
The pharmacy now sells pain relievers or non-steroidal anti-inflammatory drugs (such as naproxen, aspirin, ibuprofen, etc.). For a while, they will reduce the sensitivity of the muscles, however, it is not recommended to use them all the time, especially since they do not accelerate the healing process. In addition, massage can also effectively help (it will promote blood flow to the muscles, thereby reducing tissue stiffness and tension). To reduce pain, you can also take a contrast shower or a not very warm, even cool, bath. But in the event that the pain will make itself felt for a week or more, consult a doctor.