Check out example codes for "how to make something addforce in the direction of something in untiy". It will help you in understanding the concepts better.

Code Example 1

dir = target.transform.position - transform.position;
dir = dir.normalized;
rigidbody.AddForce(dir * force);

Learn ReactJs, React Native from akashmittal.com