How do I get monsters to spawn in a certain place?

I suspect this has been asked before, but I can't find the question so I'll answer this one:

Aggressive monsters, with the exception of ghasts, will spawn when the light level is at 7 or below. Torches are considered a light source of level 14, Lava, Glowstone, and Fire are at level 15. For each square away from the light source, you drop the light level by 1. If multiple light sources are affecting that square, the highest light level is taken. Glass does not lower light levels as it passes through (anymore than the normal amount), water and ice adds an additional 2 levels of penalty.

Monsters also cannot spawn within 24 squares of the player, and monsters will not spawn if you go to sleep in a bed to skip the night. If every player in SMP is in bed by the time night comes around, then the night will be skipped.

Finally, keep in mind that spiders can now climb walls so even though you have built a wall around your house, you may still find spiders from within. So make sure that you build a roof.