In games, a "transform" refers to how an object is positioned, oriented, or scaled within the game world.
To move an object, to rotate an object, or to squash and stretch an object are all forms of "transformation". The transform is a data structure that stores the current transformation state of the object: where it is, which way it's facing, and how big it is.
Frequently games use a "transformation hierarchy" - meaning that objects are organized into nested relationships of "parent" objects that contain "child" objects, arranged so that if you transform the parent, all of its children and grandchildren etc. get transformed together with it.
In this context, an object has two transforms: its local transform relative to its parent node, and a global transform representing its ultimate position/orientation/scale in the world after factoring in all the effects of its parent, grandparent, etc.
Node2D.transform is the local transform. It offers members like...
get_origin(): where should this node sit, relative to its parent's origin and rotation?
get_rotation(): how is this node rotated relative to its parent (in radians)?
get_scale(): how has this node been squashed or stretched relative to its parent's scale?
Another way to think of transformation is to think of "local space". As I sit at my desk, I am facing southward. If I extend my right arm out to the side, it represents my "local x+ axis", currently pointing west. If I turn 90 degrees to my right, my right arm now points north. So I carry my own local coordinate system with me as I move and orient myself in space.
Game objects do this too. A Godot transform gives you vectors representing the direction that the object's local x+ axis and local y+ axis point, within its parent's local space. Its parent's space in turn can be transformed relative to the grandparent's local space, all the way up to the global coordinate system.
There is also a
Node2D.global_transform representing the object's net transformation in the world, after its parent, grandparent, etc.'s local transforms have all been stacked-on.
Under the hood, a transform might be stored as a transformation matrix, or as a position vector, a rotation angle / quaternion, and a scale touple.