As well as being using in battles, attacks can be used out of battle from the Spells menu, by triggering them from an item, or with the map cure (or obsolete out of battle cure) script commands (these commands can use any attack, not just a cure.
An out-of-battle attack always targets a single hero in the active party. The attacker is either a particular hero (when used from that hero's Spells menu) or a virtual attacker that has the average stats of the whole party (when used from an item). "map cure" can work either way.
Attacks which target stats other than HP or MP have a permanent effect outside of battle. Changes to stats other than HP or MP during a battle are temporary until the end of battle. See Permanent Stat-Boosters for more.
Most attack settings have no effect outside of battle. Attack chains don't happen. Aim math is ignored - attacks can't miss or fail. Attack elementals have no effect. Attack appearance/animation is irrelevant. Attacks targetting the Mute/Stun/etc registers have no effect. All of the Effects attack bitsets are ignored. Attack tag settings aren't processed.
Most target class settings are ignored and treated as "Ally (not dead)", except those allow or require targetting a dead hero. "Cannot target hero slot X" attack bitsets are ignored.