Just as the magnitude of the current flowing through a resistor can be calculated using Ohm's law for DC, it can also be calculated for AC. Since the voltage is a function now, the calculated current is also a function.
$ I(t) = \dfrac{V(t)}{R} $
$ V(t) = V_{p} ⋅ sin(\omega ⋅ t) $
$ I(t) = \dfrac{V_{p}}{R} ⋅ sin(\omega ⋅ t) $
$ I_{p} = \dfrac{V_{p}}{R} $
$ I(t) = I_{p} ⋅ sin(\omega ⋅ t) $
Since the voltage of the coil gets higher with a change in current, its voltage is highest when the change in current (its derivative) is greatest. This results in a phase difference between voltage and current functions.
$ I(t) = \dfrac{1}{L} ⋅ \displaystyle\int V(t) \, \,dt $
$ V(t) = V_{p} ⋅ sin(\omega ⋅ t) $
$ I(t) = \dfrac{1}{L} ⋅ \displaystyle\int V_{p} ⋅ sin(\omega ⋅ t) \, \,dt $
$ I(t) = \dfrac{V_{p} ⋅ \omega}{L} ⋅ (-cos(\omega ⋅ t)) $
$ I(t) = \dfrac{V_{p} ⋅ \omega}{L} ⋅ sin(\omega ⋅ t - 90°) $
$ I_{p} = \dfrac{V_{p} ⋅ \omega}{L} $
$ I(t) = I_{p} ⋅ sin(\omega ⋅ t - 90°) $
The phase difference between current and voltage is -90°, so in AC, the current in a coil is late compared to the voltage.
The capacitor current gets higher when the voltage changes. The current is at its highest when the voltage changes the most, so there is a phase difference between voltage and current in a capacitor, as well.
$ I(t) = C ⋅ \dfrac{dV(t)}{dt} $
$ V(t) = V_{p} ⋅ sin(\omega ⋅ t) $
$ I(t) = C ⋅ \dfrac{d(V_{p} ⋅ sin(\omega ⋅ t))}{dt} $
$ I(t) = C ⋅ V_{p} ⋅ \omega ⋅ cos(\omega ⋅ t) $
$ I(t) = C ⋅ V_{p} ⋅ \omega ⋅ sin(\omega ⋅ t + 90°) $
$ I_{p} = C ⋅ V_{p} ⋅ \omega $
$ I(t) = I_{p} ⋅ sin(\omega ⋅ t + 90°) $
The phase difference between current and voltage is -90°, so in AC, the current in a coil is early compared to the voltage.