It is important to consult your physician to rule out any cause other than joint or muscle pain.
Depending on his diagnosis, he will prescribe medical imaging such as an X-ray or MRI to reveal the exact cause of your jaw pain.
You may need to consult a dentist if a dental problem is evident.