Basically what
Naitsabes said.
1. You can either choose to restrain and reform or overrun.
BRB p. 58: "If a unit charges into combat and, by the end of that round of close combat, all its enemies have been wiped out as the result of the combat (rather than the pursuit) the unit can choose to make a pursuit move, even with nobody left alive to pursue. This is an overrun move and represents the unit surging forwards, hungry to find more enemies to fight.
An overrun is essentially a special pursuit move."
BRB p. 57: " A unit that does not pursue can perform a reform manoeuvre. If your unit elected to restrain and passed the test to do so, or wiped out the enemy and did not overrun, it can now perform a reform manoeuvre."
Note also BRB Official Update Version 1.9, p.8:
Q: If I charge an enemy and they are wiped out before the Close Combat phase, can I choose to either Overrun or Reform From Victory? If I can, when does this occur? (p58)
A: Yes. This occurs at the start of the Close Combat phase before any blows have been struck.."
2. These are the general targeting restrictions for spells (BRB p. 31):
"unless stated otherwise the following rules apply:
• The target must lie within the Wizard's forward arc.
• The Wizard does not need line of sight to his target.
• The target must he within the spell's range.
• Wizards cannot target spells at units engaged in close combat."
The fact that a Wizard cannot cast spells
into CC, does not mean he can cast spells
out of CC - unless, of course, stated otherwise (like in the case of magic missiles).
3. You do not even need enough ranks to do so. As long as there is a R&F model in contact with the nemy, you can exchange him with a character - as long as he has a compatible footprint.
BRB p. 100: "You can exchange him with rank-and-file model(s), including the command group, that are in base contact with the enemy. [...] Only characters whose footprint is compatible with the unit's rank and file can do this."
4. HE AB p. 36""High Elf models with this special rule can make supporting attacks with one extra rank than normal."
BRB p. 49: "Supporting attacks cannot be made to the side or rear. Nor can they be made by models that are in base contact with enemies — they must fight the more immediate foe!"
5. As
Naitsabes indicates, not everything that has fire or flame in its name has the Flaming Attacks special rule. However, in the case of the Lore of Fire, it is part and parcel of the Lore Attribute (BRB p. 492): "All of the spells in the Lore of Fire are Flaming Attacks."