DNA is usually packed into cells 500 to 600 times the length of the bacteria in supercoiled loops. Not all bacteria have circular chromosomes so this isn't a problem for all bacteria. Supercoiling means the twisting of DNA around its central axis. As DNA becomes wounded up it will eventually be bunched into supercoils and unable to unwind anymore.
The answer to this supercoiling problem is DNA gyrase which is also called topoisomerase II. This enzyme removes supercoils from DNA in front of the replication fork and converts positive supercoils into negative supercoils. DNA gyrase does this by cutting the DNA with a double strand break and passing the unbroken portion between the gap and then resealing the break. This relieves the supercoil tension and solves the problem of DNA overwinding.
Source:The Physiology and Biochemistry of Prokaryotes by David White 4th edition