Your description of the pain seems to be originating from muscular injury
or strained muscle as it appears only during movement or when the concerned muscle is used . You havent mentioned whether pain is present during rest also .It is advisable to you not to exercise too much and giving your muscles rest for a few days . If it doesnt get relieved further evaluation will be advisable.
Get well soon.