GameObject Class understanding

Hello , just understanding the fundamentals of Unity
I cant understand the GameObject variables in scripts.
where are they actually ? are they in hierarchy when we declare them ?

look at this example :

GameObject testObject;
Light testLight;

Void Start() {
testLight = GetComponent<Light>();
//or
testLight = testObject.GetComponent<Light>();

What is different when use the testObject and when we dont use it?
what does it actually do ?

The following line testLight = GetComponent<Light>(); calls Component.GetComponent(). As indicated in the documentation, this function returns the Light component from the GameObject this script is attached to.

The following line testLight = testObject.GetComponent<Light>(); calls GameObject.GetComponent(). As indicated in the documentation, it returns the Light component from the GameObject referenced by the testObject variable.