If you look at your top circuit you will notice that there are shorts where the input, emitter and output capacitors were - this is the first step to doing an AC analysis. The caps are assumed to pass AC without hinderance so thay are shorted. Resistors are presumed to to attenuate so these are left in.
Whether a resistor is connected to Vsupply or ground is irrelevant - The power supply is assumed to be one big capacitor and so this is also shorted to ground (note the ground symbols on R1, Rc and Rout1).
You then use the Hfe of the transistor (current gain of the transistor) to calculate the signal-gain as it goes from base to collector.
So, on the base is a fraction of Vin and this fraction is initially determined by the attenuation produced by Rs, R1 and R2. BUT importantly it is mainly dictated by the B-E of the transistor - it can be assumed to be forward-conducting and sometimes it is easier to assume it is a short circuit hence the current into the base is purely Vin / Rs.
This current is amplified by Hfe (current gain) and produces a voltage on the collector that is dictated by the parallel combination of Rc, Rout1 and Rout2.
Thus you can determine the approximate signal gain for AC.
Me, I use a simulator - it's quicker especially if you are trying different values out AND takes all the transistor details into account and can give a fairly accurate frequency response too.