Two kinds of type
Lines 10 and 11 declare two small types that each bundle an X and a Y. Point is a struct, a value type. Coord is a record: a class, so a reference type, that the compiler fills with extra code.
Structs: values
Line 1 makes a Point and sets its fields with an object initializer. Because Point is a value type, the variable a holds the data itself, X = 1 and Y = 2, not a reference to data somewhere else.
Line 2, var b = a, copies every field of a into b. Now there are two separate Points that happen to hold the same values. Nothing links them.
Line 3 sets b.X to 9, and only b changes. Line 4 prints a.X and the console shows 1: the original is untouched. Had Point been a class, a and b would share one object and print 9.
Records: data on the heap
Line 5 calls the constructor the compiler wrote for Coord. A record class is a reference type: new puts the object on the heap, and r holds only a reference to it, shown as an arrow.
X and Y are init-only: you can set them only while the object is made, so r.X = 9 does not compile. Line 6 uses a with expression instead: it copies the object, sets X to 9, and leaves r alone.
The compiler also wrote a ToString method for Coord, so line 7 prints the type name and every property: Coord { X = 9, Y = 2 }. A plain class would print only its name, Coord.
Line 8 makes t, a second object with the same values as r. Line 9 asks r == t. For records, == compares the type and every value, not the references, so it prints True.
Choosing
Pick a struct for a small value that acts like one number, such as a point. Pick a record for data you copy and compare by value. Pick a plain class for an object with its own identity and behaviour.
What happens
// step 1/9 · types
line 10 struct Point { public int X, Y; }
struct → a value type (like int)
line 11 record Coord(int X, int Y);
record → record class → a reference type
(X, Y) → the compiler writes a constructor,
properties, ==, ToString and more
Local variables such as a and b usually live on the stack, but that is a detail of the runtime, not of C#. What C# promises is that a value-type variable holds its own copy of the data. The #1, #2 and #3 on the references stand for the objects' addresses; you never see or use real addresses in safe C#.