Urinalysis is used to detect and manage conditions like urinary tract infections, kidney disease, and diabetes. It examines the urine's appearance, concentration, and contents, with signs such as cloudy urine indicating infection, high protein levels signaling kidney disease, and elevated glucose levels suggesting diabetes.