By Ev training it .
For every 4 ev points you get your stat boosted by 1 .
372 for a zoroark is with the best nature ( That boosts sp. attack ) -
The max evs that a pokemon can get is 510 and for one specific stat its 252 , so if a stat other than the desired one , of zoroark is maxed you could use EV reducing berries on that so that zoroark can gain max sp. attack .
For maxing Sp.attack fight pokemon that yield sp.attack evs - http://pokemondb.net/ev
Also Iv's play a role .
Iv's are chosen RRANDOMLY so read the dialogue that indicate that your pokemons sp.sttack is boosted .