The H in hacienda (or really anywhere else1) is not pronounced at all. It's a silent letter.
The X used to have a sound similar to the SH in English and the J had a sound similar to English's J (if you're familiar with the sound often written as ZH, that's it). Over time, the sounds represented by the X and the J, which were fairly close, merged into a single sound that evolved into something that sounds quite like the English H.
Because many Xs now sounded the same as Js, most words that had an X were changed to J (those Xs that sounded like English's X kept their X as a rule).
So why does X get used for the H sound today? Many places in Mexico got their name before the sound change happened (and in Nahuatl, for instance, you pronounce the name of the Mexica tribe as meh-shee-kah). After the sound change, you'd think the spelling of places like Mexico or Oaxaca should also get a J. They did for a long time, actually, and Méjico is considered a valid spelling. Nonetheless, people get used to writing names a particular way, and don't tend to like to change them (sort of like how we write New York not New Yoick and New Orleans not Nawlins), and so the spelling with X was always used in Mexico itself, and today is the preferred spelling.
As a result, the letters X, J (and a G followed by E or I) will all sound like English's H.
Additionally, although not common for Mexican Spanish, you will notice that the S will often be pronounced like English's H. This generally happens when the S is at the end of a syllable, though not always.
1. In some imported words like hámster you will hear it aspirated, and in certain words in an extremely limited regions in Spain you can hear the h pronounced today, such that albahaca has an audible H.