What you are seeing is called motion blur. Simply stated, it is blur caused by motion during exposure. Horses obviously move and their legs will show even more motion. The solution to this is to use a faster shutter-speed.
You can control the shutter-speed in Shutter-Priority mode or in Manual mode. For the former you will get a metered exposure which will make this easy. Turn the Mode-Dial to S mode and use the control-dial to select the shutter-speed.
The faster the horse moves across the field-of-view, the faster the shutter-speed needs to be. I would start with 1/1000s. If there is still blur, raise the speed. If images come out too dark, lower it. Eventually though, if it is dark and you still get blur, there is no way out but to buy a brighter lens.
You can also go at it backwards, open the aperture to the maximum in Aperture priority mode and put the ISO at the maximum acceptable setting. This way, the camera will choose the faster speed to get a proper exposure. Some shots may still end up blurry when it is darker, but this would give you some good odds of usable results.