Back in the day when I used to live in a multi-apartment building someone was being so loud as to wake me up in the middle of the night and I could never figure out who it was. It was an old building so the noise would transfer across many floors/walls. I was trying to come up with an engineering solution to this but in the mean time I got a new job and had to move anyway. Probably a microphone array would work to triangulate the source, but it would also be hard to explain to the police.
Hypothetically you could talk to all your neighbors. But I understand the tradition is only communicate with apartment neighbors with percussive modes of communication (I.e. pounding on the wall).
Learning to sleep with ear plugs in was the best investment of time I've ever made. Of course they don't totally kill out the sound but they lower it down by enough dB that you can comfortably ignore it, it takes piercing annoying noises and drowns them down to an ignorable level.
Good earplugs (like Mac's Earplugs) will (almost) completely eliminate the higher pitches. There's not a lot that one can do about lower pitches, but a white noise machine can help (either a dedicated white noise machine, or a small fan, etc).
But yeah - I grew up with quiet nights and it was a challenge to live in a dorm. Earplugs for the win! :)
I recently had a fire alarm with a failing battery and their way of telling you about the battery problem is a single loud warning beep every 70 or so seconds (something irregular of course), just enough to wake you up to an entirely silent room. Battery voltage was right on the edge and the detection circuit hopelessly naive so it would generally only beep at night when temperatures fell, often not even repeatedly. Horrible product.