If it is unclear by symptoms as to what you are sick with, you will consult a physician. A physician will take their best guesses as to your problems name, and medically test you for it. After your diagnosis is complete through blood test, medical imaging, saliva samples, biopsy, electrocardiogram, stool samples, or urine tests, the physician will decide which is the best way to treat you.
Diagnosis is sometimes made by process of elimination. This is called a "differential diagnosis". Through investigation of symptoms and consultations with other doctors or physicians, they are able to tell what you DO NOT have, thus leaving them with your most likely disease.
In the 1900's, a man named William Osler began to "practice" medicine. He used the principles of diagnosis and treatment to reduce suffering and increase life expectancy. Osler decided that to practice medicine you must learn to identify diseases, understand where they come from and how they work, and then decide which is the best way to cure them. This is known today as "The Oslerian Ideal". And we have this man to thank for medicine practice today. I suppose, however, we could also thank him for waiting rooms...