That depends... Often, answers can be discerned just from the history of your specific symptoms (timing, severity, location, things that make the symptoms better or worse, associated problems etc., ) and maybe a physical exam. Some (many) require all that plus some tests, such as blood, ecg, x-rays or mris, some will require a biopsy. Lastly some diagnoses require entire teams of doctors.
Good question! When you plan to visit your doc try to be prepared. When your problem started? Was it acute onset or slow, what time of the day, how long does it last? Try to recall all symptoms, what they related to, time of the day. What trigger them? Are they intermittent or continuous? Where do the problem located (if you can tell)? What do you take to alleviate the problem: pills, lay down? Name of your meds.