Suppose I have a magnet and I put a piece of iron next to it, then the magnet will attract it.
Now if I put a piece of wood in front of the magnet and the piece of iron, the iron will not get attracted. Why?
Now I have heard that gravitation is also magnetism, so it should also show the properties similar to that of magnet but it is not so, even if I put a big building between ground and the object it gets attracted. Why?