Capacitor in AC op-amps
This is too long for a comment, and it might provide an answer for you.
In order to answer your question, we need to know what you do know, and don't understand, so here is a series of questions for you to answer.
In the DC-coupled amplifier, what are the opamp node voltages and output voltage when
a) Vin is 0 V?
b) Vin is 1 V?
c) Vin switches between +/- 1 V?
d) Vin switches between +5 V and +3 V?
In the AC coupled amplifier, what are the opamp node voltages, capacitor voltage, and output voltage when
a) Vin is 0 V?
b) Vin is 1 V?
c) Vin switches between +/- 1 V...
c1) switching slow enough for the capacitor to charge fully?
c2) switching so fast the voltage on the capacitor does not change?
d) Vin switches between +5 V and +3 V...
d1) switching slow enough for the capacitor to charge fully?
d2) switching so fast the voltage on the capacitor does not change?
When we know which of these you have trouble answering, we can can help you. However, you might just answer it yourself working through these.