It seems that this question is asked because of difficulties in trying to visualize higher dimensions.

Fig.1: The full manifold is here $\mathbb{R}^2\times S^2$.
I) Let us therefore for simplicity assume that the physical universe is just a 2D cylinder$^\dagger$ surface $\mathbb{R}\times S^1$. Imagine that there are only one large (uncompact) $x$-direction and one compact $y$-direction, where $y\sim y+2\pi R$ is periodic, and $R$ is small.
^ y
|
| .A <---image
-----|---------------- y = 2 pi R-------------------
|
| .B
|
|
| .A
-----|------------------ y = 0------------------------> x
|
| .B <---image
Fig.2: Two point particles $A$ and $B$ on a 2D cylinder. The two lines $y = 0$ and $y = 2 \pi R$ should be identified.
Let $A$ and $B$ be two point particles. $A$ and $B$ then live in the same uncompact $x$-direction and in the same compact $y$-direction. On the other hand, the positions $(x_A,y_A)$ and $(x_B,y_B)$ of the two points are not necessarily the same.
II) The above Section I is only meant as a guide to get the main idea. In string theory, we often assume that the full spacetime is topologically a direct product of a large 4D spacetime and a small compact space. In more elaborate models, this needs no longer be the case. For further information about string theory and extra dimensions, see also e.g. this and this Phys.SE posts.
--
$^\dagger$ Technically, we imagine the 2D cylinder surface as an abstract 2D manifold rather than an embedded 2D manifold (so that we don't have to introduce more than 2 dimensions).