Peano (biography) was fascinated by Cantor's work, especially the counterintuitive notion that there are just as many points in the unit interval as the unit square. What better way to demonstrate this than to map the former onto the latter. Do it continuously, and you have a space filling curve.
Peano's curve is based on the cantor set, which I will denote as C. Remember that C maps continuously onto the closed interval [0,1]. Apply this map in two coordinates, and the topological product C*C maps onto the unit square. Then, apply the fact that C*C is homeomorphic to C, and build a continuous map from C onto the unit square.
Of course C is not the same as the closed interval [0,1], but the map can be extended. Let x be a point in [0,1] that is not in C. It has been excised, as part of an open interval. The endpoints of this interval, call them a and b, map to two points in the unit square. Map all points in between, including x, into the unit square linearly. Thus, if x is halfway between a and b, then f(x) is the midpoint of f(a) and f(b). The result is a continuous map from the entire closed interval [0,1] onto the unit square.
Since Cn is homeomorphic to C, a similar result holds in n dimensions. A space filling curve can cover the unit hypercube in n space.