How do you get rid of a UTI at home?

You don't. A urinary tract infection should be treated by a physician who can prescribe the proper antibiotics.
Go see your Dr. Best way to get rid of UTI at home is to take antibiotics prescribed by your doctor.