operand types are 'const char [4]' and 'String'

I got this error.

operand types are 'const char [4]' and 'String'

How to solve this error ?

I want to convert string into const char. How can I do that ?

Hard to say what is going on specifically if you did not provide your code and full error text.
However, "const" in type means constant and constant means something which is not able to change.

const char a[4]="ON";
void loop() 
{
  if(a == wifi.getDataAdafruitIO_STRING(X_AIO_KEY, USERNAME, "test2", HOST_NAME, HOST_PORT))) 
  {
    digitalWrite(1, true);
  }
  if(a == wifi.getDataAdafruitIO_STRING(X_AIO_KEY, USERNAME, "test2", HOST_NAME, HOST_PORT))) 
  {
    digitalWrite(1, false);
  }
}

wifi.getDataAdafruitIO_STRING (Will return string value.)

Try to shift over the operands because there is no definition for such operator [const char * == String], should be [String == const char *]:

  if(wifi.getDataAdafruitIO_STRING(X_AIO_KEY, USERNAME, "test2", HOST_NAME, HOST_PORT) == a )