(CS1525) and (CS8025) please help me!

using UnityEngine;
using System.Collections;

public class PauseGame : MonoBehaviour {
public Transform Canvas;

// Update is called once per frame
void Update () {
    if (Input.GetKeyDown(KeyCode.Escape))
    {
        if (Canvas.gameObject.activeInHierarchy = false)
        {
            Canvas.gameObject.SetActive(true);
        } else
        {
            Canvas.gameObject.SetActive(false)
                }
    }   
}

}

if (something == false) not if (something = false)& you might need to rename Canvas & decalre it as GameObject not Transform :

public GameObject obj;
void Update () {
    if (Input.GetKeyDown(KeyCode.Escape)){
        if(!obj.activeInHierarchy){//shorthand for "if(obj.activeInHierarchy == false)"
            obj.gameObject.SetActive(true);
            else{
                obj.gameObject.SetActive(false);
            }
       }
    }
}