op amp
Phase shift is caused by reactance, either capacitive or inductive or a combination of both.
A capacitor has an intial very high current to charge and a slower rising voltage, an inductor allows voltage through but impedes the current, these effects cause the current to lead the voltage or vice verser. This is phase shift.
Now, the calculation of these effect leads us into the realms of higher mathmatics. If this excites you, go for it.
Otherwise, get yourself a good simulator and let the machine do the work.