At the end of the movie Cooper arrives at "Cooper station", a giant habitable space station with a cylindrical interior which was near Saturn at the time--many such stations were built, and apparently when Murph solved the gravity problem (by finding a theory of quantum gravity with the help of the data Cooper sent her from the black hole, see my answer here from more on this), the surviving humans were launched into space aboard such stations, I don't think there had been any effort to settle humanity on a planet yet (see the answers to this question for speculations about why they hadn't yet tried to settle Edmund's world).
As for how solving gravity allowed them to achieve this, it was because the stations they had built on Earth were too massive to launch in the normal way, so their only hope of launching them and achieving escape velocity from Earth was to temporarily alter the gravitational constant in the space occupied by the Earth, so that gravity would become much weaker for a time and it would be easier to escape the Earth's pull. This is described in chapter 31 of The Science of Interstellar, which was written by Kip Thorne, the physicist who was the science consultant for the movie:
Early in Interstellar, when Cooper first visits the NASA facility,
he is shown a giant, cylindrical enclosure being constructed to carry
thousands of humans into space and house them for many generations: a
space colony. And he's told there are others being constructed
"How does it get off Earth?" Cooper asks the Professor. "Those first
gravitational anomalies changed everything," the Professor replies.
"Suddenly we knew that harnessing gravity was real. So I started
working on the theory—and we started building this station."
How did it get lifted into space? The key, of course, was the quantum
data (in my scientist's interpretation, the quantum gravity laws)
that TARS extracted from Gargantua's singularity (Chapters 26 and 28)
and Cooper transmitted to Murph (Chapter 30).
Murph must have figured out how to reduce Newton's gravitational
constant G inside the Earth ... In my interpretation, with Newton's G
reduced inside the Earth to, say, a thousandth of its normal value
for, say, an hour, rocket engines could lift the enormous colonies
As a byproduct, in my interpretation the Earth's core—no longer
compressed by the enormous weight of the planet above—must have sprung
outward, pushing the Earth's surface upward. Gigantic earthquakes and
tsunamis must have followed, wreaking havoc on Earth as the colonies
soared into space, a terrible price for the Earth to pay on top of its
blight-driven catastrophe. When Newton's G was restored to its normal
strength, the Earth must have shrunk back to its normal size, wreaking
more earthquake and tsunami havoc.
But humanity was saved. And Cooper and ninety-four-year-old Murph were
reunited. Then Cooper set out in search of Amelia Brand in the far
reaches of the universe.