Help understanding how to use a SG3525
They are basically a throttle control; normally you're trying to hit some target like an output voltage or a motor speed. If you're off that target, a voltage or speed sensor connected to that "error amplifier" lets the PWM controller know, so it adjusts PWM until that error is 0 (you're on target). 

Compensation is the art of controlling the frequency response of that error amplifier to prevent overshoots and oscillation. 

That's the outline; now you either have to learn a lot about control systems theory, feedback amplifiers, and stability, or follow one of the example designs very closely.

A simple approach for experiments would be to connect an adjustable voltage into pin 2, and simply short pins 1 and 9 turning the "error amplifier" into a unity gain buffer. Then you should be able to see the duty cycle change as you adjust the voltage on pin 2.