The cleaner is normally acetone based. Some add dyes to show you where you've 'cleaned'. Acetone will dissolve and soften the top layer of the PVC, but eventually, the PVC will shrink (especially if there are any temperature cycles) and separate, and needless to say, will no longer pass the 65PSI test. The glue hardens, and bonds the two softened surfaces together as it dries. The glue itself is PVC, dissolved in solvent (mostly acetone/ether). By putting it on the pipe and fitting, it creates a bond between the liquid pvc (glue) and the pipe and the fitting, making the seal and giving the strength.
I ran a few thousand miles of PVC pipe around swimming pools to put myself through college.