While this is a topic that's often covered by many online music resources aimed at the DIY crowd, there's a great deal of misinformation and misunderstanding floating around on this topic.
First, let's get one thing out of the way: abandon all hope here of building a truly 100 percent soundproof room. Unless you're working for an Ivy League physics department, you lack the budget and resources to even attempt to tackle this task. And, if you were, you also probably wouldn't be reading this article on soundproofing principles anyway. Don't despair, though – you can do a really great job at keeping sound in (or out) despite being not absolutely 100% soundproof.
The next thing we need to clear up before we go further are the differences between "soundproofing" to reduce sound transmission and "sound treatment" to tame acoustics within the room. There's a big difference between these two things, and they're not interchangeable.
This is the reason why you were getting looks from haters when you slapped up egg crate foam mattress toppers or moving blankets all over the inside of your closet to make your "soundproof booth." There's a number of issues with this method besides people having to duck the clothes rod running through at head level every time somebody wants to record something. I'll save most of these for another article on acoustic treatment as that's what has been done here. Acoustic treatments are things that are applied to surfaces of the room that will affect the actual acoustic response within the room; they are not soundproofing.
What is soundproofing? Soundproofing is the application of practices or physical treatments to actually stop the transmission of sound through a structure. So with that, you can already begin to see how sticking some foam on the wall is not doing anything for soundproofing. Sound transmission has to be defeated at its most fundamental level, which often requires physical adjustments to the space. So before you nail blankets to the wall and your new home studio winds up one Bob Marley poster away from looking like somebody’s freshman dorm room (unless, of course, that's what you're going for), read on...
When you're soundproofing a room, you have a couple of major enemies working against you.
Air gaps: If air can get through, sound can get through. Obviously, a room needs a door, but this also includes gaps around outlet boxes, air vents, windows, etc. These are known as "flanking paths," anywhere sound can travel where it can bypass things that have been put in place to reduce sound transmission.
Structural sound transmission: Oddly enough, air is actually a difficult medium for sound to travel through; a more dense medium can make it easier for sound to travel. Your average building is full of these dense mediums: wall studs, concrete or wooden floors, floor and ceiling joists, and other parts of the actual structure of the building.
So, from the get-go, you're already fighting a losing battle against the relentless nature of sound. It should also start becoming apparent at this point that if "soundproof" is your goal, it's not going to come terribly cheap, even at the DIY level. (That's right – there's no $80 fix despite what people will tell you.) Trust me, if there were shortcuts, there wouldn't be an entire industry dedicated to studio construction/design or master's degrees in acoustics.
I'm also not saying the only way to properly do this is by spending tens of thousands of dollars – I just hate seeing my fellow musicians spend their hard-earned money and wind up looking like the emperor and his new clothes thinking they did something productive.
With the right knowledge, you can decide which approach is best for you and spend money on the right tool for the right job. You're better off not soundproofing at all rather than buying a crate of high-density foam thinking you're getting a result that you're not. Nobody wants to buy a hammer when the right tool is a wrench.
True Soundproofing - Creating a 'room within a room'
The easiest way, unfortunately, is to purposely build your intended studio/rehearsal space. If space and budget allow, this is best achieved by quite literally building a room within a room. The key is that you need to isolate this inner room as much as possible from the surrounding structure, often by having the room "float" on the existing structure and traditionally adding an air gap surrounding the room itself. If you're confident with some basic construction principles and handy with tools, this can be done in a few different ways.
"Floating" the floor
If you ever felt your room shake when a large truck drives by or even when somebody walks by in the hall, you've witnessed how easily these aforementioned structures transfer vibrations. The key is to get your floor to "float" on the existing floor. While there are a number of products and processes on the market, the cleanest and easiest is probably the U-Boat method, where the newly constructed floor is built on rubber U-Boats to help eliminate the transfer of energy. This floor, however, must be strong and stable enough to support the weight of the new "room," as this will be the only point to which everything is anchored.
Decoupling the walls and ceiling
Regardless of whether you're looking to simply replace your existing sheet rock walls or go for the full room-within-room method, if you don't decouple the walls in some way from their studs, you're going to see little to no difference for your efforts. Normal drywall is simply attached to the wall studs, allowing energy to transfer from one side of the wall through the studs and right into the wall on the other side.
Again, while several methods of eliminating this contact exist, one method that's particularly effective is to use a resilient channel system to mount the drywall. Now instead of the vibrations of the drywall transferring to the stud, the new mounting system isolates the two parts. With the resilient channel, however, care needs to be taken not to "short out" the system accidentally by making contact with a stud in the wall, rendering the whole system useless. Additionally, these decoupled pieces should not physically touch one another, and any air gaps should be sealed with a silicone-type acoustic caulk.
Another way, usually used in conjunction with the other methods, is to simply make the wall harder to move. Either add another layer of drywall to the existing drywall with a product such as Green Glue (which acts as a shock absorber, transferring the energy of the sound to heat), or simply sandwich a material like Mass Loaded Vinyl (MLV) into the wall to make the travel of vibrations more difficult.
The renter's dilemma
So what happens if it's not in your interest – or even possible – to make such invasive additions to your current space? You'll definitely have to sacrifice the quality of your soundproofing, but sometimes your only option is to upgrade your current space as best you can. Some small additions aren't invasive or don't require general construction know-how.
Sealing windows and doors
These are naturally the proverbial "chink in the armor" of any room. If you have basic single-glazed windows, and you can afford to lose the view, shuttering it off with a combination of heavy plywood and mineral wool/fiberglass may be your best bet. There are kits that can be purchased to modify existing windows, but in most cases, temporarily eliminating the window is probably your best option.
Standard hollow interior doors offer little in the way of soundproofing qualities, and should be replaced if possible. Otherwise, if the door must stay as is, any attempt to increase the mass of the door (soundboard, MLV) in addition to ensuring a good seal all around the door (including the threshold) will yield a better result. Some sort of thick neoprene door seal at your local big box hardware store will offer a wallet-friendly place to start. After applying, check to make sure there are no leaks or gaps around the seals – a flashlight and a friend can be helpful here. If the option exists to hang a second door to make an "airlock" of sorts, this will almost always yield a better result than the thickest and most treated of single doors.
Decoupling individual items
Obviously this is not as effective as treating the whole room properly, but removing specific sound sources themselves from the structure can be helpful. This goes for monitors, speaker cabinets, subwoofers, and even entire drum kits. Products like Auralex's ISO-Series exist to help with this decoupling.
Applying as many of these methods as possible will yield you a far better rehearsal or recording experience, but as with any project, know when you're out of your league! If you need to consult someone who knows (and I mean actually knows) what they're doing, don't hesitate to do so. There's no shame in getting a second opinion, and the money "saved" in DIY projects can quickly be canceled out by the accompanying medical bills or invoices for plumbers, electricians, etc.