We present a generic model of cell motility generated by acto-myosin contraction of the cell cortex. We identify analytically dynamical instabilities of the cortex and show that they trigger spontaneous cortical flows which in turn can induce cell migration in 3-dimensional (3D) environments as well as bleb formation. This contractility--based mechanism, widely independent of actin treadmilling, appears as an alternative to the classical picture of lamellipodial motility on flat substrates. Theoretical predictions are compared to experimental data of tumor cells migrating in 3D matrigel and suggest that this mechanism could be a general mode of cell migration in 3D environments.