Q: Are all spells are defensive in nature and activate only when a hero carrying one is attacked?

A: Yes, spells are defensive (passive) and can only be activated when an enemy hero (Or Boss in cooperative mode) attacks the equipped hero.

Q: Are spells discarded after use?

A: Yes, spells are discarded after use. They are one-time use.

Q: To clarify: a hero must play a spell at the first valid opportunity (i.e. if a weak attack is launched, the spell must be spent and cannot be saved up until later)

A:  That is correct!  Any attack damage from an enemy hero, even if it's 0, can trigger the spell.

Q: If a hero has two spells, are both of them used at the first opportunity? Or does the hero choose which to use?

A: If a hero has 2 spells, the hero can choose which one to activate.

Q: Do spells only trigger when the hero is attacked using the 'attack' step of the turn? Or can a spell trigger when the hero is targeted with a hero skill or weapon skill?

A: Only attack damage will activate the spell. If the hero is targeted with skills non relate to attack damage like brain control, sleep, drain HP, etc... The spell won't be activated.