What Exactly does UV mapping do with relation to the vertices?

From the code below, in Unity what does assigning the UV do in this sense.

 Mesh CreatePlaneMesh()
 {
     Mesh mesh = new Mesh();
    // Step 1: Create the points in real world space
     Vector3[] vertices = new Vector3[]
     {
         new Vector3( 1, 0,  1),
         new Vector3( 1, 0, -1),
         new Vector3(-1, 0,  1),
         new Vector3(-1, 0, -1),
     };
      // Step 2: ????
     Vector2[] uv = new Vector2[]
     {
         new Vector2(1, 1),
         new Vector2(1, 0),
         new Vector2(0, 1),
         new Vector2(0, 0),
     };
    // Step 3: From verticies select which are gonna be the triangles
     int[] triangles = new int[]
     {
         0, 1, 2,
         2, 1, 3,
     };

     mesh.vertices = vertices;
     mesh.uv = uv;
     mesh.triangles = triangles;

Hi @Cornelis-de-Jager !

The UV mapping are the texture coordinates assigned to each vertex.

This coorinates are in [0,1] range for U (horizontal) and V (vertical) texture axis. A value outside this range behaves differently based on the wrapping configuration (when inporting the texture into Unity)

For further information: