The declare attackers step is a step of the combat phase, where creatures may be assigned to attack.
Creatures assigned in this step are attacking.
From the Comprehensive Rules (Ravnica Allegiance (January 25, 2019))
- 508. Declare Attackers Step
- 508.1. First, the active player declares attackers. This turn-based action doesn't use the stack. To declare attackers, the active player follows the steps below, in order. If at any point during the declaration of attackers, the active player is unable to comply with any of the steps listed below, the declaration is illegal; the game returns to the moment before the declaration (see rule 721, "Handling Illegal Actions").
- 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.
- 508.1c The active player checks each creature they control to see whether it's affected by any restrictions (effects that say a creature can't attack, or that it can't attack unless some condition is met). If any restrictions are being disobeyed, the declaration of attackers is illegal.
Example: A player controls two creatures, each with a restriction that states "[This creature] can't attack alone." It's legal to declare both as attackers.
- 508.1d The active player checks each creature they control to see whether it's affected by any requirements (effects that say a creature attacks if able, or that it attacks if some condition is met). If the number of requirements that are being obeyed is fewer than the maximum possible number of requirements that could be obeyed without disobeying any restrictions, the declaration of attackers is illegal. If a creature can't attack unless a player pays a cost, that player is not required to pay that cost, even if attacking with that creature would increase the number of requirements being obeyed. If a requirement that says a creature attacks if able during a certain turn refers to a turn with multiple combat phases, the creature attacks if able during each declare attackers step in that turn.
Example: A player controls two creatures: one that "attacks if able" and one with no abilities. An effect states "No more than one creature can attack each turn." The only legal attack is for just the creature that "attacks if able" to attack. It's illegal to attack with the other creature, attack with both, or attack with neither.
- 508.1e If any of the chosen creatures have banding or a "bands with other" ability, the active player announces which creatures, if any, are banded with which. (See rule 702.21, "Banding.")
- 508.1f The active player taps the chosen creatures. Tapping a creature when it's declared as an attacker isn't a cost; attacking simply causes creatures to become tapped.
- 508.1g If there are any optional costs to attack with the chosen creatures (expressed as costs a player may pay "as" a creature attacks), the active player chooses which, if any, they will pay.
- 508.1h If any of the chosen creatures require paying costs to attack, or if any optional costs to attack were chosen, the active player determines the total cost to attack. Costs may include paying mana, tapping permanents, sacrificing permanents, discarding cards, and so on. Once the total cost is determined, it becomes "locked in." If effects would change the total cost after this time, ignore this change.
- 508.1i If any of the costs require mana, the active player then has a chance to activate mana abilities (see rule 605, "Mana Abilities").
- 508.1j Once the player has enough mana in their mana pool, they pay all costs in any order. Partial payments are not allowed.
- 508.1k Each chosen creature still controlled by the active player becomes an attacking creature. It remains an attacking creature until it's removed from combat or the combat phase ends, whichever comes first. See rule 506.4.
- 508.1m Any abilities that trigger on attackers being declared trigger.
- 508.2. Second, the active player gets priority. (See rule 116, "Timing and Priority.")
- 508.3. Triggered abilities that trigger on attackers being declared may have different trigger conditions.
- 508.3a An ability that reads "Whenever [a creature] attacks, . . ." triggers if that creature is declared as an attacker. Similarly, "Whenever [a creature] attacks [a player or planeswalker], . . ." triggers if that creature is declared as an attacker attacking that player or planeswalker. Such abilities won't trigger if a creature is put onto the battlefield attacking.
- 508.3b An ability that reads "Whenever [a player or planeswalker] is attacked, . . ." triggers if one or more creatures are declared as attackers attacking that player or planeswalker. It won't trigger if a creature is put onto the battlefield attacking that player or planeswalker.
- 508.3c An ability that reads "Whenever [a player] attacks with [a creature], . . ." triggers whenever a creature that player controls is declared as an attacker.
- 508.3d An ability that reads "Whenever [a creature] attacks and isn't blocked, . . ." triggers during the declare blockers step, not the declare attackers step. See rule 509.5g.
- 508.4. If a creature is put onto the battlefield attacking, its controller chooses which defending player or which planeswalker a defending player controls it's attacking as it enters the battlefield (unless the effect that put it onto the battlefield specifies what it's attacking). Such creatures are "attacking" but, for the purposes of trigger events and effects, they never "attacked."
- 508.4a If the effect that puts a creature onto the battlefield attacking specifies it's attacking a certain player, and that player is no longer in the game when the effect resolves, the creature is put onto the battlefield but is never considered an attacking creature. The same is true if the effect specifies a creature is put onto the battlefield attacking a planeswalker and that planeswalker is no longer on the battlefield or is no longer a planeswalker when the effect resolves.
- 508.4b A creature that's put onto the battlefield attacking isn't affected by requirements or restrictions that apply to the declaration of attackers.
- 508.5. If an ability of an attacking creature refers to a defending player, or a spell or ability refers to both an attacking creature and a defending player, then unless otherwise specified, the defending player it's referring to is the player that creature is attacking, or the controller of the planeswalker that creature is attacking. If that creature is no longer attacking, the defending player it's referring to is the player that creature was attacking before it was removed from combat or the controller of the planeswalker that creature was attacking before it was removed from combat.
- 508.5a In a multiplayer game, any rule, object, or effect that refers to a "defending player" refers to one specific defending player, not to all of the defending players. If a spell or ability could apply to multiple attacking creatures, the appropriate defending player is individually determined for each of those attacking creatures. If there are multiple defending players that could be chosen, the controller of the spell or ability chooses one.
- 508.6. A player is "attacking [a player]" if the first player controls a creature that is attacking the second player. A player has "attacked [a player]" if the first player declared one or more creatures as attackers attacking the second player.
- 508.7. One card (Portal Mage) allows a player to reselect which player or planeswalker a creature is attacking.
- 508.7a The attacking creature isn't removed from combat and it isn't considered to have attacked a second time. That creature is attacking the reselected player or planeswalker, but it's still considered to have attacked the player or planeswalker chosen as it was declared as an attacker.
- 508.7b While reselecting which player or planeswalker a creature is attacking, that creature isn't affected by requirements or restrictions that apply to the declaration of attackers.
- 508.7c The reselected player or planeswalker must be an opponent of the attacking creature's controller, or a planeswalker controlled by an opponent of the attacking creature's controller.
- 508.7d In a multiplayer game not using the attack multiple players option (see rule 802), the reselected player or planeswalker must be the chosen defending player or a planeswalker controlled by that player.
- 508.7e In a multiplayer game using the limited range of influence option (see rule 801), the reselected player or planeswalker must be within the range of influence of the attacking creature's controller.
- 508.8. If no creatures are declared as attackers or put onto the battlefield attacking, skip the declare blockers and combat damage steps.
From the glossary of the Comprehensive Rules (Ravnica Allegiance (January 25, 2019))
- Declare Attackers Step
- Part of the turn. This step is the second step of the combat phase. See rule 508, "Declare Attackers Step."
An extra attack (Untap all creatures that attacked this turn. After this main phase, there is an additional combat phase followed by an additional main phase.) is primary in red and tertiary in white.
A rarely used mechanic keeps you from either being attacked for a turn or as long as a specific permanent is on the battlefield. This effect is primary in white and secondary in green.
Forcing a target creature to attack is primary in red and secondary in blue. Red is flavored as emotional tampering and blue as mind control.
Creatures that must attack every turn if able are also primary in red. Since the gameplay is not always great, R&D has been scaling this feature back in red overall.