This technique is called refreshing. In proper culinary circles, plunging hot cooked vegetables into cold water is actually known as ‘shocking’ the vegetables.
Proper ‘shocking’ quickly lowers the temperature of the food to near the freezing point, ensuring it retains the same texture when cold as when the cooking was completed.
It also preserves bright colors that are easily destroyed by prolonged exposure to heat.
Refreshing (shocking)