"TMJ", although it has become almost a household word, is a non-specific, catch-all term for a variety of pain/dysfunction conditions of the head and neck. It was originally derived from "Temporomandibular Joint", your jaw joints - once thought to be the source of most of these ailments.
Today we know that there are many causes of head and neck problems that may or may not be related to the temporomandibular joint. For this reason, although not as widely familiar, most dentists use "TMD" (for temporomandibular disorders) to more accurately describe the condition. You may normally think of a number of the symptoms of TMD as being medical conditions, not related to dentistry.