Planeswalkers are legal targets for attacking creatures. Under CR 508.1, when you declare attackers, each attacking creature can be declared as attacking either a player, a planeswalker controlled by a player, or (in some formats) a battle. So directing an attack at a planeswalker fully satisfies the requirement to attack.
Creatures with abilities like "this creature attacks each combat if able" (such as Goblin Rabblemaster's tokens or Minion of Lim-Dûl) simply require that the creature be declared as an attacker. The rules do not restrict what that creature must attack — only that it must attack if legally able (CR 508.1d covers the "if able" condition).
Combat damage dealt to a planeswalker removes that many loyalty counters from it (CR 306.7). If the planeswalker's loyalty reaches zero, it is put into its owner's graveyard as a state-based action.
Example: You control a Goblin token with "attacks each combat if able" from Goblin Rabblemaster. Your opponent controls a Liliana of the Veil. On your combat phase, you may declare that token as attacking Liliana of the Veil. This satisfies the forced-attack requirement, and any damage dealt removes loyalty counters from Liliana.
The only time the forced-attack requirement cannot be satisfied by attacking a planeswalker is if some other rule prevents the creature from attacking that specific target (e.g., a protection ability on the planeswalker). In that case, the creature must still attack something else if a legal target exists.
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.