S and I ean be realised (ex-post) or planned (ex-ante). Planned S and planned I are equal only at equilibrium level. Realised S and realised I are always equal. The equality is derived as,
Y = C + S and Y = C + I
Hence, S = I
So, in ex-ante sense, saying and investment may or may not be equal, but in ex-post sense, saving and investment are always equal.