What we know is that Haki is a manifestation of inner strength/willpower/spirit. It is similar to chakra/ki/Nen. It has not been shown or implied to be usable in any way besides the three know types. It is a latent ability in sentient beings (and that we know of only sentient beings) that exists in the world of One Piece. I do not mean spirit as another word for ghost but instead soul/essence/life energy/determination.
There is no implicit mystery behind it or rather I did not pick up on hints that there is a secret. It is a physical/spiritual law of that universe that does not really exist in this one.
The reason it works on logia users seems to be that hitting with one's spirit will hit their spirit. Even if their body has been turned to flame by their logia, hitting their spirit will still do damage and turn their body back it normal. Any more explanation of this would require an explanation of the nature of a devil fruit (which I don't fully know but Oda and Vegapunk do).
Some fans have been speculating as to whether Haki without understanding Haki is the cause of some of the more outstanding displays of ability in the early series but this is not confirmed. This includes Pell's survival, cutting steel, anything Oda calls "heart" etc. That is the only thing I know of that can be considered an outstanding mystery.
There are three types of Haki and they can be read on said wiki:
- Observation Haki/Mantra allows the user to detect the spirit of other people. It allows him to detect where they are and predict any attack they are about the throw.
- Armament Haki which hardens a weapon/skin/clothing of the user at will to protect against blows. This allows the user to hit with his spirit and hurt logia users that are immune to normal blows with their fluid state.
- Conqueror's Haki allows the user to force his will at a distance towards others. This can induce terror in the recipient or cause them to pass out. Often this is used to convince beasts to flee or follow the orders of the user. Apparently it can also be used to push away inanimate objects as was done by Shanks on Whitebeard's ship.
In essence Haki is always the same energy. The powers are to sense it in others, focus and use it in oneself, or push it out of oneself at others.