How to block out city noise

How to block out city noise? Noise-cancelling headphones, white noise machines, and earplugs help, but we need to think beyond temporary fixes.