More info needed
The exact nature of the pain plus your age and health information are needed.
Pain lasting a second or so, for instance is not very worrisome. If you are older and it occurs with exertion, that would be very worrisome. How severe, how long it lasts, associated symptoms, etc. Are important to know. In addition, an examination and some simple tests are needed to make a diagnosis.