Simple way, it’s use function WorldToScreenPoint(), which transforms position from world space into screen space. Attach this script at your object(write on CSharp):
void OnGUI() {
//Use Main Camera and get position current object, but point position is pivot point
Vector3 screenPos = Camera.main.WorldToScreenPoint(this.transform.position);
//And size box, for example 100x50
GUI.Box(new Rect(screenPos.x, Screen.height - screenPos.y, 100, 50), "myBox");
}