To get Haki in Blox Fruits, first, go to the Frozen Village in the First Sea. Look for the secret cave where you can purchase Haki.
Once you have unlocked Haki, you need to level it up. Gain experience by hitting NPCs or allowing them to hit you. Accumulate 50,000 to 75,000 experience points to achieve full body Haki.
For an AFK method, find an NPC with at least 10,000 health. Equip your weakest sword to minimize damage and position yourself so the NPC cannot hit you back. This allows you to auto-grind for experience.
If you prefer a non-AFK method, gather multiple NPCs in one place and hit them to gain experience quickly. This method is more effective than the AFK method.
Lastly, to edit your Haki, talk to the Aura Editor available on every island. Use the editor to change your Haki stage as needed.