You don't say what kind of law you're asking about, nor what grade you're at, assuming this has to do with a science or physics class. So, I'll try to be as clear as possible. For another explanation, see the reference below.
First, you can ask "how does a body near the Earth respond to gravity?"
The body -- whether a big rock or a small feather -- will accelerate at a specific rate, about 9.8 meters per second per second. This means, as Galileo demonstrated, that a "light" object will fall exactly as fast as a "heavy" one. Of course, you know that a feather will glide, not fall like a rock: this is because air resistance is much greater for the feather than the rock. If you dropped the rock and the feather inside an airless chamber, they would fall equally fast, and your brain won't believe what it sees.
The second question you might ask is "why does the gravitational force decrease with distance?" Also, you might ask "How would I describe the motion of an object that responds to the force of gravity?" I'm assuming you're not asking this, so I won't answer it here. If you want to know this, and you understand algebra, I can say more. I'll check back in a little while.
In case you aren't asking why gravitation decreases with distance, skip the rest of this answer, which gets into a bit of algebra.
Light and gravity happen to behave similarly in this respect. Here's a thought experiment: imagine your flashlight gives a square beam (perhaps it has a square bulb?) that spreads out more as you shine it on things farther away.
Suppose this light beam exactly covers one square foot of cardboard, when the cardboard is 3 feet away; that is, it covers a square 1 foot wide and 1 foot high.
Now, move the cardboard twice as far away (6 feet, although the number itself doesn't matter). Now the square beam spreads out twice as far on each side, so the area of the square is 2 feet x 2 feet: 4 square feet.
So, by doubling the distance, you have multiplied the area by 4. You have multiplied the distance by 2, and the area is multiplied by 4, which is the square of 2 (the amount by which you multiplied the distance). In fact, if you multiply the distance by any number n, you multiply the area by n*n. This relation is called a "square law effect".
But the flashlight hasn't gotten brighter or dimmer: you have the same amount of light spread over a greater area, so the beam looks dimmer. In fact, since the area has been multiplied by 4, the brightness has been multiplied by 1/4.
And this works for any distance also: if you multiply the distance by n, you multiply the brightness by 1/(n * n). This is called an "inverse square effect".
Almost done, catch your breath. Gravity also has an inverse square effect: if you multiply the distance by n, you multiply the gravitational force by 1/(n * n).
The gravitational attraction between two bodies is dependent on two factors, the mass of each of the bodies and the distance between them. Apart from these the gravitational force of attraction between two bodies is not affected by any other factor and the force is the same no matter where in the universe the bodies are. This is why it is called The Law of Universal Gravitation.
The relation which gives the force of attraction is F= G* M1* M2 / D^2. Here G is the Gravitational constant approximately equal to 6.674*10^-11 N m^2 kg^-2, M1 and M2 are the mass of the two bodies and D is the distance between them. It can be seen that the force is directly proportional to the masses and inversely proportional to the square of the distance between the bodies.