Disable a GameObject:

gameObject.SetActive(false);

Enable:

gameObject.SetActive(true);

Check state:

gameObject.activeSelf
gameObject.activeInHierarchy

Disable only one component:

component.enabled = false;