Drop a very cold ice cube into a warmer drink and you may hear a sharp crack.
The sound comes from stress building inside the ice.
Different parts of the cube are changing temperature at different speeds.
The outside warms first
The outer layer touches the warmer liquid directly.
It begins warming almost immediately.
As its temperature changes, the structure of the ice changes slightly too.
The outer region tries to expand.
The center is still colder
Heat needs time to move inward.
For a short period, the outside has changed more than the center.
The warmer outer region and colder inner region are now trying to behave differently.
That creates mechanical stress.
Enough stress can fracture the cube
Ice is rigid and contains tiny imperfections.
If the stress becomes strong enough, an existing flaw can grow into a crack.
That sudden fracture produces the sound you hear.
Is this related to why ice floats?
Not directly, although both depend on the unusual structure of solid water.
Why ice floats is about ice being less dense than liquid water.
Cracking in a drink is about different parts of the same ice cube changing temperature at different rates.
Can other materials crack from temperature changes?
Yes.
Rapid uneven heating or cooling can create thermal stress in glass, ceramics, rock, and other materials.
The same ice can behave differently for a completely different reason when salt melts ice by lowering water’s freezing point.
If different parts expand or contract by different amounts, the material can fracture.
Why do some cubes crack and others stay quiet?
It depends on the temperature difference, the cube’s shape, internal flaws, and how quickly heat moves through it.
A cube from a very cold freezer entering a relatively warm drink has a stronger temperature difference than one that has already warmed slightly.
So the ice is not reacting to the flavor of your drink.
Its outside and inside are simply changing temperature at different speeds.
And that’s the short explanation.
Related explanations: Why does ice float?, Why does salt melt ice?, and Why does metal feel colder than wood?