In this configuration the OpAmp works as a inverting amplifier.
The gain:
G = -Rf/Rg
Output:
Vout = Vin*(-Rf/Rg)
Ps.: Rf is the resistor in the feedback loop.
Ps2 .: This simulation use DC signals because it's easier to see the numerical results and check with the formula. You can change to sine or square wave if prefer.