what is the relationship between the distance from the magnet and the strength of the magnetic force?
Magnetic force obeys an inverse square law with distance. The equation for magnetic force is similar to Coulomb's Law (if you are familiar with it). But the key point is that the force is inversely proportional to the distance squared (i.e. it obeys an inverse square law with distance).