RIMS stands for Recirculating Infusion Mash System.
With a RIMS system, you are directly heating the wort, either via a water heater element mounted into the mash tun, or via a gas burner mounted under the mash tun. In order to avoid scorching, and to ensure a uniform temperature through out the mash tun, the wort is pulled from the bottom of the tun and pumped back up to the top. One example of a gas powered RIMS would be the Brutus Ten
The method described above, of mounting a heating element into a pipe and passing the wort over that, would be another type of electrical RIMS.
HERMS stands for Heat Exchanged Recirculating Mash System.
With a HERMS system, you are never directly heating the wort. Instead, you heat the water in the hot liquor tun, again either through electric or gas, and then you pump your wort through a heat exchanger coil mounted into the hot liquor tun, before it goes back into the top of the mash tun. Because the heat exchanger is indirectly heated, it is thought to be easier on the wort, avoiding any scorching or carmelization.