Fosfomycin is used in the treatment and prevention of bacterial infections of urinary tract.Fosfomycin is an antibiotic. It kills bacteria by preventing them from forming the bacterial protective covering which is needed for their survival. It also reduces bacterial attachment to cells lining the bladder.