What does it mean to "wrap" a D-brane around some manifold? I am getting quite confused with this terminology when I read the papers. Like while constructing the near horizon $AdS_3$ in the $D1-D5$ system one considers $IIB$ on $R^{1,4}\times M^4 \times S^1$ and one "wraps" $N_1$ D1 branes on the $S^1$ and $N_5$ D5-branes on $M^4 \times S^1$. What does it exactly mean? 
Coming from reading how D-branes were introduced in Polchinksi's book I would think that in a $9+1$ spacetime Dp branes are some planar streched out stuff with a $p+1$ worldvolume and whose $p$ spatial dimensions are transverse to the $9-p$ spatial dimensions which have been compactified and T-dualized.  So are we now saying that its possible that instead of imagining the Dp branes as some set of periodically arranged planes on the T-dual torus we can also think of their spatial world being compactified on some arbitrary p-manifold?
If "wrapping" is really a choice of topology for the p-spatial dimensions of the Dp-brane then what determines this choice? Is this something put in by hand or does this happen naturally? 
 A: D-branes are not restricted to planar geometries. They can take on many different forms, and you often encounter branes wrapped around spherical manifolds, like $S^1$ or $S^4$. To determine whether a given configuration is stable, you have to evaluate the action of the D-brane configuration, which is given by the Dirac-Born-Infeld action. For a $Dp$-brane, it is given by 
$$S_{DBI}=-T_p\int d^{p+1}x \sqrt{-\text{det}(g_{ab}+2\pi\alpha'F_{ab})},$$
where $T_p$ is the brane-tension, $g_{ab}$ is the metric of the brane, $\alpha'$ is the string length squared and $F_{ab}$ is the field strength of the gauge fields on the brane.
Branes wrapped on nontrivial geometries sometimes have a direct physical interpretation. In holographic QCD, branes wrapped on an $S^4$ correspond to baryons. This can be understood from the fact that this non-trivial topology generates an instanton number which can be identified with the baryon number. 
EDIT: For a great introduction to the subject, consult the book "D-Branes" by Johnson, or his shorter lecture notes: http://arxiv.org/abs/hep-th/0007170 
