Hello. I’m trying to make a horse movement system and i want to make it using 2 spheres and one body(body is just a gameobject that is parent to 2 spheres). Spheres are named Rear and Front. Rear rolls forward and back, Front rolls left and right. I don’t need anything script-wise actually. I just don’t know how to keep spheres attached to the body. Like, what components should i add and what settings must be set? Idk how physics joints work eather 
Right now: Spheres have rigidbody component and body only has movement script.
Joints would be one potential answer.
You might want a third invisible body in the center with joints to each.
Different types of joints do different things, so definitely experiment.
Keep in mind it might be harder to get what you want using physics than to just do the motion yourself. Physics can only get you so far.
You got off on the wrong hoof. 
What’s a horse? A four-legged animal. Last time I checked, four-legged animals don’t turn on their front hoofs and don’t accelerate only using their rear hoofs.
Meaning you don’t need to build it this way because the result will be awful, in all likelihood it will not even function in any meaningful way. Even if you spin the front hoof sphere perpendicular to the forward motion this would hardly start turning the horse while it’s racing. Not to mention the problems you’ll run into when either front or rear is bouncing and thus keeps losing contact with the ground.
Most disastrously, the rear sphere would constantly try to overtake the front sphere, spinning the horse around and eventually having it race backwards.
What’s also a four-legged animal? A car, of course.
So just build a regular 4-wheeled vehicle controller (or rather pick one that already exists) and instead of a car mesh you’d use a horse mesh.
Where it falls apart in both cases: if the horse is standing still, it could still turn around on itself. A car can’t do that. Your solution could but it would have the entire horse pivot unnaturally around its rear legs.
You can also try to build the horse with a single sphere, but the sphere is centered between the legs. This would almost get you there, and even allows for moving strictly sideways (a trained horse can do that, but it’s not a natural movement behaviour).
Also worth considering is how you deal with the horse leaning into curves. You can fake it with animation only but if you need this physical, you need four actual legs or wheels.