Kim et al were interested in simulating the compartmentalization of signaling molecules involved in PKA-dependent LTP in the hippocampus. They wanted to know: does PKA need to be anchored near its target molecules, or near a source of activator molecules? They varied the location of PKA and one of its activator molecules (adenylyl cyclase) to try to determine this. It turns out that placing PKA near its activator molecules (i.e., source of cAMP) leads to more downstream activity than placing it near its target molecules.
Also of interest is a very cool model of a dendrite with one spine that they used for their stochastic simulations, which is below and could help you visualize these structures:
Since molecular simulation is computationally expensive, they only allow diffusion in 2-D in the dendrite (notice the lack of vertical dotted lines in the cross section) and 1-D in the spine. Further improvements to molecular simulation or computational power should one day make this sort of simplification unnecessary.
Kim M, Park AJ, Havekes R, Chay A, Guercio LA, et al. (2011) Colocalization of Protein Kinase A with Adenylyl Cyclase Enhances Protein Kinase A Activity during Induction of Long-Lasting Long-Term-Potentiation. PLoS Comput Biol 7(6): e1002084. doi:10.1371/journal.pcbi.1002084