How can a sample that is in two different states be at a uniform temperature?
For a system in equilibrium: Think of it as a closed system, with a certain amount of energy shared between the solid and liquid components (discounting the container).  At any instant, some of the faster-moving molecules of the liquid could hit the ice, melting a bit, and thereby losing some of their own energy and freezing.

It takes ~80 cal/g to change ice at 0 °C to water at 0 °C. This enthalpy of fusion, aka latent heat of fusion , "absorbs" any additional heat applied until all the ice has melted. So a gram of water at 0 °C has ~80 calories more heat than an equal mass of ice at 0 °C. If you have a 1 gram chunk of ice and apply 40 calories as heat, then about half will melt.

BTW, pure water does not necessarily freeze at 0 °C... it may supercool, which will change the calculations a bit. See this video or this one for a supercool experiment!

As @MaxW states, in real life most systems are not in equilibrium (they need to be shaken or stirred, despite Ian Fleming's direction). To view a clearly non-equilibrium demo, where there is water in three states at once, see Red Hot Nickel Ball on Ice.