The analogy is not complete, however, since gravity waves are not caused by the same things as electromagnetic waves. If you want to skip past this part , go ahead.
Magnetism is that thing that happens with magnets and compasses and the earth.
The cool thing is that the two things are linked. Say you've got this wire, and there's a current going through it, which means there are lots of electrons streaming through it in a certain direction. That wire also generates a magnetic field which looks like a collection of rings surrounding the wire at a certain distance. Makes household electrical wiring a pain, but it's still pretty neat. The field, be it electric or magnetic, is this invisible thing that happens when you have electrons moving from one place to another.