It refers to the ones involved in the collision. On object collision > sub-event : Pick instance 0, Pick instance 1. Instance 0 is the first object to collide, instance 1 is the one collided with. So if you set up the following :
On sprite colliding with sprite :
----Pick sprite instance 0 : Text 1 set Text sprite.UID
----Pick sprite instance 1 : Text 2 set Text sprite.UID
Text 1 would show the UID of the sprite that collided and Text 2 would show the UID of the sprite that it collided with. This is how I do it when it is the same objects that are colliding.