With great difficulty. Fortunately, although building space settlements will be very difficult, it's not impossible particularly if we start small and close to Earth. Studies suggesting that small settlements in Low Earth Orbit directly above the equator are practical mean that the first settlements can be much closer, much simpler, and much easier to build than previously believed. Nonetheless, building cities anywhere in space will require radiation protection, materials, energy, transportation, communications, and life support.
Space settlement feasibility was addressed in a series of summer studies at NASA Ames Research Center in the 1970s. These studies concluded that space settlement is feasible, but very difficult and expensive. Follow on work has made early settlement construction much easier by taking advantage of low radiation levels in ELEO (eliminating most or all shielding) and rotating at up to 4rpm to keep early settlements small. So small that space tourism offers an attractive route from where we are today to the first space settlements. Space tourism has already started. As of 2017 the Russians have flown seven space tourists, one of them twice, using the Russian portion of International Space Station (ISS) as a part time hotel.
The tallest poles in the space settlement development tent are launch, construction, and life support. Launch is expensive today because most vehicles are expendable. After a single flight they are thrown away. The keys to reusability are technology and launch rate. There are multiple efforts in progress to develop reusable rocket technology but today's flight rate, less than 100 per year, is completely insufficient. A single reusable vehicle that can fly twice a week can meet that demand. Somewhere above 10,000 flights per year is probably needed, and tourism -- at the right price -- can generate use that kind of flight rate. No other application, with the exception of space solar power, again at the right price, has the potential to require so many flights.
Space tourists will need hotels to stay in. A primitive space hotel is very similar to today's space stations, but does not need expensive scientific equipment. Should early space hotels be successful bigger and better hotels will be built. These hotels will need to provide life support, including recycling the air and water and perhaps even some agriculture. At some point the largest hotels will be the size of a small settlement (~100 m diameter). At that point building the first space settlement is not much more difficult than building yet another hotel.
Space solar power is the other source of high launch demand, although it cannot develop space hotels. Electrical power is a multi-hundred billion dollar per year business today. We know how to generate electricity in space using solar cells. For example, the ISS provides about 80 kilowatts continuously from an acre of solar arrays. By building much larger space energy systems, it is possible to generate a great deal of electrical power. This can be converted to microwaves or infra-red and beamed to Earth to provide electricity with absolutely no greenhouse gas emissions or toxic waste of any kind. If transportation to orbit is inexpensive following development of the tourist industry, much of Earth's power could be provided from space, simultaneously creating a large profitable business and dramatically reducing pollution.