Be honest. When you sit down on a toilet, the last thing you want is for it to rock from side to side. In many cases a simple plastic wedge placed under the toilet, followed by a bead of caulk around the base where the toilet meets the floor, will solve the problem.
Sometimes it’s just a loose toilet bolt that needs to be tightened. But if the bolt is spinning in place, try this. Remove the nut and washer on the bolt and carefully inject either an epoxy glue or a construction adhesive onto the base of the bolt. Don’t get any adhesive on the threads of the bolt.
Allow this adhesive to dry overnight, then replace the washer and the nut, and tighten it up to eliminate any rocking.