Check out example codes for "2d object look at object". It will help you in understanding the concepts better.

Code Example 1

Vector3 dir = enemy.position - transform.position;
float angle = Mathf.Atan2(dir.y,dir.x) * Mathf.Rad2Deg;
transform.rotation = Quaternion.AngleAxis(angle, Vector3.forward);

Learn ReactJs, React Native from akashmittal.com