Often flu is diagnosed by observing the symptoms. It can be precisely diagnosed using lab tests. Doctors can pinpoint which flu virus is infecting you by taking a swab from your nose or throat, and sending the swab to the lab for testing.
The lab testing shows whether or not the swab sample contains flu virus, and if there is a flu virus, which exact strain it is. Knowing which flu strain is affecting people helps doctors and public health officials keep track of the disease. Doctors also use the test to check that it is the flu that's making you sick, and not some other disease.