In order to cast spells a Shaman must be able to draw on the power of the Waaagh! That means he has to be within 12" of at least one unit of troops consisting of at least 10 Orcs or 20 Goblins (lit'l greenskins generate less Waaagh! power than their big cousins).
If a Shaman is not within 12" of a unit of at least 10 Orcs or 20 Goblins he cannot cast spells that turn. Units which are fleeing don't count towards the Waaagh, and units smaller than 10 Orcs or 20 Goblins don't count either.