I wanted to start creating custom EV spreads, but I don't understand the importance of HP evs, why are they important, and what are they used for?
I'll try to help you here:
1) If your pokemon is going to be holding Leftovers, it is most beneficial to have an HP stat that is divisible by 16, because leftovers recovers 1/16 of a pokemon's HP each turn, rounded down. I.e. if your pokemon has 159 HP, it will recover only 9 HP each turn, whereas 160 HP will recover 10.
2) If your pokemon is holding life orb, you will want your pokemon to have an HP stat ending with a 9, because again, life orb (10%) recoil rounds down. I.e. A pokemon that has 159 HP loses only 15 HP after attacking while a pokemon that has 160 HP loses 16 HP after attacking.
3) Substitute: If your pokemon is holding a pinch berry, it then depends on whether you want your berry to activate after 3 substitutes or 4 substitutes. 4 Subs is generally for moves like Reversal (whose base power increases with lower HP), but in most other cases (like Petaya, Liechi, Salac) it is better to activate the berry after 3 subs. If you want to activate berry after 3 subs, HP should be divisible by 4.
Sometimes people want to have HP divisible by 16, plus 1, just so they can switch an extra turn into stealth rock. That's probably not too big of a deal in most cases.
For Breloom (Toxic Orb Poison Heal), you want to have HP divislble by 8 instead of 16 (or 8, plus 1 or whatever), because Poison recovers 1/8 HP instead of 1/16.
Likewise, for Flame Orb Guts pokemon, it might be good to have HP divisible by 8 minus 1 so you lose less health for each turn. Of course, it's probably not a huge deal.
That's about all the basics I can think off the top of my head. So, just use your judgment and calculator.