How and when can we use if

if + present form
If you heat ice, it melts
In this type of sentence you could use when instead of if. it's always true that when you heat ice it melts. This is why this type of sentence is sometimes called a zero conditional

if + present form + will can or may
If I am late, I will call you
If you need me, you can call me at home
If it gets any hotter, we may have a thunder storm
In these sentences ther is a strong possibility that the fist part (coming after if) is going to happen. The second part says what will happen as a result