If it is your 1st week of gym, then muscle soreness is very common due to overuse & overstress of muscle. Perform hot fomentation, take cold water bath & continue with gymming... it will go away.
If you are doing gym for a longer time, then the pain may be a result of an injure due to faulty technic or using too much weight. Look for swelling. Ice it. And consult with physiotherapist.
Next Steps
consult with physiotherapist
Health Tips
always perform gym exercises under the supervision of your trainer.
dont go into compitition of lifting havy weights above your copasity.
always take bath with cold water after gym. cold water helps in preventing muscle soreness and promots rapid healing of body after workout.
always take proper diet.