im new but can someone expalin this one thing to me.

#include <dht.h>

#define dht_dpin 2 //no ; here. Set equal to channel sensor is on
int relay1 = 12;
dht DHT;

void setup(){
pinMode(relay1, OUTPUT);
Serial.begin(9600);
delay(300);//Let system settle
Serial.println("Humidity and temperature\n\n");
delay(700);//Wait rest of 1000ms recommended delay before
//accessing sensor
}//end "setup()"

void loop(){

if (DHT.temperature > 25) digitalWrite(relay1, LOW);

if (DHT.temperature < 24) digitalWrite(relay1, HIGH);

//This is the "heart" of the program.
DHT.read11(dht_dpin);

Serial.print("Current humidity = ");
Serial.print(DHT.humidity);
Serial.print("% ");
Serial.print("temperature = ");
Serial.print(DHT.temperature);
Serial.println("C ");
delay(800);//Don't try to access too frequently... in theory
//should be once per two seconds, fastest,
//but seems to work after 0.8 second.
}// end loop()

im just starting out with this but im trying to make a temp and humidity controller and im confused. above i have 2 if value i tried to use else but i was not using it correctly so i tried it that way, the frist if is "if (DHT.temperature > 25) digitalWrite(relay1, LOW);" and to my understanding it should if the temp is greater then 25 it should turn off the relay but its turning it on and the other HIGH is turning it off. and it s actually working the way i need it, the way the code it written.

HIGH and LOW don't directly map to on and off; that will depend on how you have the output device wired.

If you are using a relay, instead of using the normally open contacts N.O. use the normally closed contacts N.C.
Or
Vice versa.

If you don't want to re-wire your circuit, this can go at the top of your program:

#define ON LOW
#define OFF HIGH

Then you can do things like

digitalWrite(relay1, OFF);

thanks for the help and quick you guys are great. i never defined the on and off but i never new i could or had to. could have used it the way it was but was confusing as was all back words lol.