I'm studying from Munkres' Topology textbook. There is an example in page 308 that says:
Every 1-compact manifold X has topological dimension 1. The space X can be written as a finite union of spaces that are homeomorphic to the unit interval [0,1]; then the preceding corollary applies.
There is also a very similar statement in the next example that says the same but instead of a 1-manifold is a 2-manifold and instead of [0,1] is the closed ball in $R^2$
I don't quite get that.
Edit: I'll write down the definition that Munkres gives to "m-manifold" to make my question more independent:
An m-manifold is a Hausdorff space X with a countable basis such that each point $x$ of $X$ has a neighborhood that is homeomorphic with an open subset of $R^m$