Surprisingly your linked Wikipedia article does not link to an explanation of how to calculate it, and neither does this.
The equation for a synodic period is based on subtracting two frequencies, the same way a radio down-converts to an intermediate frequency by mixing two frequencies nonlinearly and using the difference in frequencies as the new signal:
$$f_{\text{diff}} = f_> - f_<$$
where the > and < indicate the larger and smaller frequencies.
In orbital mechanics we usually don't talk about orbital frequency, but instead orbital period where $T = 1/f$, so:
$$\frac{1}{T_{syn}} \ = \ \frac{1}{T_<} - \frac{1}{T_>} \ = \ \frac{T_> - T_<}{T_> \ T_<}.$$
Use that if the two rotations are in the same direction which is the case for Earths rotation around its axis and around the Sun.
could anyone illustrate it or point me in the right direction?
Put the sidereal day for $T<$ and a year for $T>$ and you'll have your answer.
But what if they are rotating in opposite directions?
In that case you can define one as having negative frequency or a negative period, and replace the minus sign with a plus sign.