They keep the shutter open for longer, and take consecutive photos that are collated by the software afterward to brighten up shadowy areas, and reduce blur or glare from highlights like lamps or neon signs. On the P20 Pro or Mate 20 Pro, the whole "night shot" ordeal takes about four seconds, during which you have to hold the phone rather steady to get a good result.
We installed the new Google Camera app port that has Night Sight enabled (courtesy of the enterprising XDA-Devs crowd) on the Pixel 2 XL, and, while you still have to wait a bit for the shot, it does everything roughly twice faster than Huawei's night mode, for instance, which was perhaps the best example of what this trick can do so far. This leads us to the thought that Google employs some different software wizardry to achieve the Night Sight results, and are pleased to see that we don't have to keep both object and phone as steady.
As for the quality of the Night Sight shots themselves, we'll spare an opinion for when Google officially rolls this out to the Pixel series, but for now, the results look no less promising than what similar "night" modes are able to produce, just the speed of picture-taking feels way faster.
It literally goes like this.
Instead of this.