Nitrofurantoin exerts its antibacterial effects by interfering with the bacterial cell wall synthesis and other vital functions of the bacteria. This leads to the death of the bacteria causing the infection. Its action is more localized to the urinary tract, making it particularly useful for treating UTIs.