Place wells, which you can find in the town buildings section of the interface. You may also want to try deleting buildings nearby to the source of the fire to stop it from spreading.