It is hard to tell the difference when working out for the first time. Most will equate soreness as pain because it is very uncomfortable. You are starting to use muscles that has not been used in quite some time, and they are reacting to the change. The soreness is usually located in the muscle and not the joints. The soreness may start a day or two after your workout and should go away or taper off in a few days. Make sure you drink plenty of water, eat, and rest up. When in doubt, consult your doctor or medical professional.
Remember to start slow and do not rush the process. An injury will only prolong your fitness journey, and push you several steps back. Working out should not be painful, just a little uncomfortable.