In this recipe, you created a prefab containing the properties of a 3D Plane named tile, which contained a component instance object of the ClickMeToSetDestination C# script class.
The TileManager script class loops to create 50 x 50 instances of this tile Gameobject in the scene.
When you run the game, if you click on the mouse button when the mouse pointer is over a tile, the NavMeshAgent component inside the Sphere-arrow GameObject is set to that tile's position. So, the Sphere-arrow GameObject will move toward, but stop just before reaching, the clicked tile position.
The Y value of 0.01 means the plane will be just above the terrain, so we avoid any kind of Moire interference pattern due to meshes being at the same location. By subtracting rows/2 and cols/2 from the X and Z positions, we center our grid of tiles at (0, Y, 0).