Microwaves cause water molecules to vibrate. This vibration generates heat, warming your food. The microwaves are specifically tuned to the frequency that excites water molecules.
That's why microwaves don't heat things evenly - water molecules cluster in some areas, getting more energy than others.