Magnetism and electricity is not the same but it's exactly related,
Magnets have two polls the north and the south, and electricity has positive and negative particles. how ever, the electricity can be convert to magnet and magnet can be convert to electricity... that is how the magnet and electricity are said to be similar.
The refrigerator wall is not exactly a magnet but it is a commonly metal, that can attract magnets... the refrigerator magnets are have an alternating polls so when we put the two magnets(Refrigerator magnets) together, they attract each other...
hope this help you a little...