When does a monster spawner activate in minecraft?

Solution 1:

To test this, I built a tower over some spawners and stayed directly over them about 15-20 blocks higher than they are.

enter image description here

As you can see, the flames have disappeared (and the spawners quit spinning, but you can't tell that from a picture), indicating that they are no longer spawning, despite me being directly over them.

So yes, it does take into account vertical distance.

Solution 2:

Yes it does take into account vertical and horizontal distance. If you are 6 blocks across and 10 blocks down from the spawner then it will continue to spawn mobs.

The except to this is if the spawner has spawned 4 mobs. After spawning 4 mobs it will wait from 10 to 40 seconds then rechecks an area 17x17x9 to see if there is less than 6 mobs of the monster spawner's type. If so, it will spawn more.

In short, monster spawners only work if a player is standing near it.

source: Minepedia - Monster Spawner