To the end of every turn, Moody raises one random stat by 2 stages, and lowers another by 1 stage. This change acts the exact same way as a boost from Swords Dance or a decrease from an ability like Intimidate (for example), therefore they remain there until you switch out, the Pokemon is defeated or they are removed some other way (for example, you have a stage 1 Special Attack boost, but your opponent uses Struggle Bug on you and your Special Attack falls back down to normal).
So no, it does not only active when you use a stat effecting move, it applies to all moves and abilities as a normal boost/decrease would. If that is what you define as 'permanent', then the answer to your question is yes.
So basically, the stat changes that Moody provides are identical to the normal ones. They don't act any differently to a normal stat change.