You are not forced to attack planeswalkers before the player.
When you attack, you may attack either the player or any planeswalker they control. The rules on declaring attackers quite simply state you choose attackers, then you choose which player or planeswalker each one is attacking:
508.1 First, the active player declares attackers. [...]
- 508.1a The active player chooses which creatures that they control, if any, will attack. The chosen creatures must be untapped, and each one must either have haste or have been controlled by the active player continuously since the turn began.
- 508.1b If the defending player controls any planeswalkers, or the game allows the active player to attack multiple other players, the active player announces which player or planeswalker each of the chosen creatures is attacking.
So, totally up to you.
If I had to guess, you've heard people share strategy advice that you should attack planeswalkers before the player so as to prevent the player from activating that planeswalker's ultimate ability. Some of them might've even put it as strongly as "you must attack planeswalkers first!" — but that's advice, not a game rule.
If not, what happens to the planeswalker if I lose all my hp? I've heard a few different things about this as well.
Well, you'll probably lose, bacause that's what happens when you have no life left. The game is over, or if it's multiplayer, all cards you own leave the game entirely.
Assuming you have something like Platinum Angel out which prevents you from losing the game (including from having zero life), nothing happens to them. You continue play because you haven't lost. You still have out whatever you had out before you hit 0 life, and none of it has changed.
Your life total and your planeswalkers' loyalty are wholly unrelated things and do not interact.