Microwave ovens work by causing liquid water pieces (molecules) to vibrate really fast. That vibration causes the water to heat up, which heats up the stuff (food and other water) around it. Eventually the water can vibrate enough that it heats up enough to boil and turn into steam.
Ice cubes are not liquid water, instead they’re made up of water molecules held really tightly together as a solid, technically a crystal. The way that the ice is formed makes it very difficult for the microwaves to vibrate the individual water molecules, so they don’t get moving fast enough to heat up much, so they don’t melt the overall ice cube.
Latest Answers