This is a macroeconomic tautology, and like many others, the words often do not have their commonly expected meaning. In particular saving and investment are not directly about money but about stuff measured in money terms
Suppose you had an economy based purely on grains of wheat. The real activities are:
- Plant wheat grains, grow them and harvest them, getting more grains as a result
- Consume wheat as food
- Store unconsumed wheat for future planting or consumption
In this case, macroeconomic saving is the amount that production exceeds consumption while macroeconomic investment is either increasing stored stocks or the planting of grains for future production. (If you were wondering, grains which rot after having been purchase by consumers still count as consumption, while grains which rot while in producers' storage count as negative investment.) So in this case, both saving and investment measure the same thing, seen from different perspectives.
Clearly you could measure this particular economy purely in grains of wheat, but if you want to do so in money terms then you would need to know the price of wheat, where say a million grains are worth $\$5$. This would then allow you to incorporate the production and consumption of other stuff into your calculations, such as barley where say a million grains are worth $\$3$ and yields are different, or beer produced from barley and bread from wheat, or anything else. But saving representing unconsumed production, and investment representing the other non-consumption uses, would remain equal, almost by definition