It is very important to firstly diagnose the soreness. If you are regularly active, jog a lot or are in the gym for hours at a time, then muscle soreness can be treated in certain specific ways. If you are not active and still are facing sore muscles, then consulting a doctor would be a good option.
Either way, the point is that you should not begin treating yourself without seeking medical help first, especially if the soreness lasts more than a couple of days.
If you are suffering from sore muscles, then it is important that you allow them to heal and recover. For example, if your leg muscles are sore, it will not be a good idea to go out jogging that day. Instead, some light cycling will keep you in that loop,and you should focus more on the upper body until the soreness goes away.
Some light medication like a Tylenol, Advil, Aleve, or aspirin could possibly do the trick, but this is only recommended once or twice per day. After that, if the pain is as consistent and as it was prior to taking the pain relievers, then it is suggested that you go to a medical practitioner and get some advice.
Increasing your intake of water is also necessary because sometimes muscles may cramp and inflame because of the lack of water in your system. Make sure you get enough of it, especially when you are working out. Driking extra water will also help the healing process of your muscles.
Most people underestimate the power of stretching and do not bother about it. This is why most people who suffer from sore muscles are not known to stretch before and after their exercise session, which is extremely important.
Once you have sore muscles, try to stretch them around lightly. This will gradually loosen them up and you will start to feel better.