In French, "h" is never pronounced like English /h/. It’s always inaudible… but it can have an effect!
Why is that important? Because consonants affect how words run together.
For example, words that start with consonants don’t allow elision. Neither does a word that starts with an « h aspiré » :
l’orange mais le pays (orange starts with a vowel but pays starts with a consonant)
l’homme mais le héros (homme has an « h muet » but héros has an « h aspiré »)
Words that start with consonants also don’t allow liaison. Neither does a word that starts with an « h aspiré » :
cet orange mais ce pays
cet homme mais ce héros
There are other similar alternations, but hopefully these examples make the pattern clear.
How do you tell whether a word has an « h aspiré » or an « h muet » ?
The Wikipedia article lists some ideas, though nothing is failsafe and most are hard to do on the fly. For example, it says that Germanic words tend to have an « h aspiré » while Latinate words have an « h muet ». But how do you know which words are Germanic if you’re not a linguist?
The failsafe way is to check a dictionary (as usual), where it will be marked in the pronunciation.
For example, here’s the WordReference pronunciation for homme with its « h muet ». Notice how the first symbol is a vowel:
But here’s the pronunciation for « héros » with its « h aspiré ». Notice that the first symbol is an apostrophe:
In addition to Luke answer which clearly explains the h aspiré issue, note that despite the fact the letter “h” is never pronounced and thus that there is no [h] consonant listed in the phonetic French alphabet, the sound [h] can nevertheless be heard in spoken French without relationship between the presence or not of the letter “h”, especially at the beginning of sentences with a stressed first vowel.
For example, the sentence:
Et alors ?
is sometimes pronounced with a leading [h], he alɔʁ instead of e alɔʁ
We make no distinction between the variants.
That also explain why the French accent often mix up words like “and ” and “hand“, “to heat” and “to eat“…