Q:

How can I access a GameObject variable in mono script from editor script?

In the mono script :
using UnityEngine;

public class TileTest : MonoBehaviour
{
    public GameObject prefabPathOnTerrain;

Then in the editor script at the top :
private SerializedProperty prefabPathOnTerrain;

Then inside OnEnable()
private void OnEnable()
    {
        prefabPathOnTerrain = serializedObject.FindProperty("prefabPathOnTerrain");
    }

And then inside a method I want to use it as a GameObject :
And instead using CreatePrimitive to use Instantiate :
But doing :
GameObject go = Instantiate(prefabPathOnTerrain);

Will not work.
public void TerrainObjects(GameObject gameobject)
    {
        Terrain terrain = Terrain.activeTerrain;
        var cube = GameObject.Find(string.Format("Terrain_{0}_{1}", gameobject.transform.localPosition.x, gameobject.transform.localPosition.y));
        if (cube != null)
            return;

        if (cube == null)
        {
              GameObject go = Instantiate(prefabPathOnTerrain);              

            //cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
        }

        cube.transform.localPosition = new Vector3(terrain.transform.localPosition.x + gameobject.transform.localPosition.x, 0, terrain.transform.localPosition.z + gameobject.transform.localPosition.y);
        cube.transform.localScale = new Vector3(gameobject.transform.localScale.x, gameobject.transform.localScale.y, 1);
        cube.transform.parent = GameObject.Find("Terrain Map").transform;

        cube.name = string.Format("Terrain_{0}_{1}", gameobject.transform.localPosition.x, gameobject.transform.localPosition.y);
        cube.tag = "Terrain Map";
    }

A:

Don't forget to read the documentation for the data types you're using.
A SerializedProperty could potentially hold any kind of data the Unity serializer supports. It's like backpack with different zippered pockets for different things you might want to carry. So if you want a particular kind of data out of it, you need to unzip the right pocket.
For a reference to a game object, that's the .objectReferenceValue pocket. So you want something like this:
var prefab = (GameObject)prefabPathOnTerrain.objectReferenceValue;

We have to cast it to the type we expect, because an objectReferenceValue could reference any Object type.
Then you can check whether the prefab is non-null and instantiate as normal.

