In a microwave oven, special antennas radiate electromagnetic waves. The typical size of these waves is a few centimeters. The oven is built so that it acts like a resonator for the wave, which means that the waves inside the oven can develop very large amplitudes (and therefore can carry lots of energy).
Electromagnetic wave's forces act on charges, pushing positive charges (+) one way and negative charges (-) the opposite way. The molecules in the food, which have easily separated (polarized) (+) and (-) parts, will therefore oscillate. As they oscillate, they transfer energy to the rest of the food by bumping into other molecules. More oscillations of molecules = heat, and higher temperature. This way the food heats up and cooks.
Water is a good molecule to heat in the microwave because it looks like this
The charges are separated which means its easier for the wave to make the molecule oscillate.
Another mechanism that is at work when microwaves heat up food is the electrical resistance to eddy currents. The electric fields of the microwaves cause electrons to move about in foods that conduct electricity, although poorly. Water with dissolved salt conducts electricity rather well, although not as well as mtals, and foods with water in them tend to have some ability to conduct electricity. As the currents flow in the food, it heats up due to resistive heating, similar to what happens to light-bulb filaments and hot-plate coils. I remember seeing an old hot-dog cooker that relied on this form of heating. Hot dogs are speared on electrodes, and current flowed from one end to the other, cooking the hot dog. These weren't popular because the hot dogs tended to burn near the electrodes and taste bad.
We don't put conductors in the microwave because they reflect the microwaves and can cause sparking, which can burn things. If you wrap a potato in aluminum foil and then put it in the microwave, the potato will not cook. Electrical currents will flow in the conductor while it is reflecting the microwaves, and if the conductor has a sharp point or edge, some of the electrons may leap off of the conductor, making a spark. That having been said, the microwave's walls are made of conducting metals (painted or coated in plastic for easy cleaning), and so they reflect the microwaves back towards the center of the oven.