For example, if you were to put a magnet on either side of the material, the magnets wouldn‘t try to pull together.
The three basic fields, Gravitational, Electrical and Magnetic go thru everything. Nothing can stop a field. However, what happens with the Electric and Magnetic fields is that they exert forces on the atoms in the material they penetrate. These forces can separate charges and re-orient atoms so that a second field is created (induced) in the material. The strength and direction of this induced field depends on the nature of the material. It is possible in some materials that the induced field can completely cancel the field causing it. This leaves a zero net field inside the material and has the effect of blocking the field. Induced fields can also add to the original field. This is how the magnetic field of a coil is enhanced by inserting an iron bar in the coil, resulting in a very strong electromagnet. There is no such induced field in gravity. So, for example, when the moon is totally behind the Earth, it feels the same gravitational pull of the sun as if the Earth wasn't there; in addition to the pull of the earth.
Any superconductor is perfectly diamagnetic and therefore has no magnetic field inside it. A large enough superconductor would prevent two magnets from attracting or repelling each other.
Try Copper or Aluminum. They both are diamagnetic, used for 'shielding' in electronic circuits