Let $M$ be a manifold and $G$ a discrete group acting freely and proper discontinuously, then $M/G$ is a manifold. If $g$ is a Riemannian metric on $M$, then it descends to a Riemannian metric on $M/G$ if and only if the group $G$ acts by isometries; to be precise, by 'descends to a Riemannian metric on $M/G$', I mean there is a Riemannian metric $g'$ on $M/G$ such that $g = \pi^*g'$ where $\pi : M \to M/G$ is the quotient map. To see how to construct $g'$ from $g$, see this answer where I show that the standard metric on $\mathbb{R}^n$ descends to the torus $\mathbb{R}^n/\mathbb{Z}^n$; here the group $G = \mathbb{Z}^n$ is acting by translations which are isometries of the usual metric on $\mathbb{R}^n$.
If $(M, g)$ is flat, and $g$ is complete, then its universal cover is isometric to $\mathbb{R}^n$ with its standard metric, so every complete flat manifold is a quotient of $\mathbb{R}^n$ with its standard metric by a discrete group of isometries which acts freely; note, every discrete group of isometries of $\mathbb{R}^n$ acts properly discontinuously. If in addition $M$ is compact, then the group action is cocompact; a discrete group of isometries which acts cocompactly is called a crystallographic group, if it also acts freely, it is called a Bieberbach group; note, a Bieberbach group can equivalently be defined as a torsion-free crystallographic group (this is the usual definition). Bieberbach showed that an $n$-dimensional crystallographic group has a finite index subgroup isomorphic to $\mathbb{Z}^n$, from which it follows that every compact flat manifold is finitely covered by a torus.
Note that not every subgroup of isometries of $\mathbb{R}^n$ gives rise to a flat manifold as it may not act freely on $\mathbb{R}^n$. For example, every isometry of $\mathbb{R}^2$ is a composition of reflections, rotations, and translations; the first two transformations have fixed points, so they don't act freely on $\mathbb{R}^2$. If the subgroup does not act freely, the quotient will be a flat orbifold instead of a flat manifold. Moreover, every flat orbifold arises this way, see Theorem $13.3.10$ of Foundations of Hyperbolic Manifolds (second edition) by Ratcliffe. In particular, a quotient of $\mathbb{R}^n$ by a crystallographic group which is not a Bieberbach group gives a compact flat orbifold which is not an manifold.