Whether you live in an apartment or are young enough to still be with your parents, there are a lot of things to consider when you take up a musical instrument.
Living in an apartment, you'll have to worry about how much of a nuisance your practice sessions might be to the neighbors.
Living at home with others, you'll have to deal with the constant presence of other people who would prefer not to hear "that racket." In short, finding a musical instrument that suits your living situation might be one major key for determining how much you're able to practice.
But there's good news. You can take up the piano without buying a grand piano and moving it into your dorm room. And you can learn guitar without getting the people in the apartment above to keep knocking on their floor to shut you up. Let's take a look at some musical instruments that might allow you to practice right where you are.
Electronic keyboards are one of the best ways to learn music, period. Why? Because learning a keyboard teaches you all about the notes and chords you'll be playing across a range of instruments: you can see an entire song be played right in front of you. There's no mystery about how sounds are produced when you're at a keyboard. Another reason: you'll find keyboards which light up the right keys for you to play when you're in practice mode. With a nice pair of headphones, you can easily keep your sounds to yourself: you can be smashing the "piano" like Franz Liszt and no one would be the wiser.
Learning the keyboard is also a handy way to build the ambidexterity you often need to play musical instruments. Playing with both the left and right hand, you learn how to get your hands to make independent movements at the same time, which allows you to become a much more dynamic musician. And since most keyboards are relatively easy to store away in the closet, you keep keyboards in a small space like a dorm room or in your house basement - it doesn't really matter.
Guitars can feel a little bulky at times, but they're easy to store and don't create a massive sound that will disturb the people who live with you. Just shutting your door is probably enough sound-proofing you need to do if you're using an acoustic guitar. Sure, electric guitars are capable of producing much more dynamic, piercing sounds, but if you stick with learning an acoustic for now, you'll be able to practice the night away without getting yelled at. If you live with a lot of other people or in a small dorm room or apartment, this makes the guitar almost ideal.
The guitar is also an iconic instrument that will allow you to play just about any type of song you want. Packing flexibility in with a relatively small package makes it great for just about any living situation.
If you have to learn drums, you can do it without waking up the entire neighborhood: electronic drums allow you to wear headphones and play softly while you produce big sounds for you - and only you. Electronic drum sets can be quite expensive, but then again, many "acoustic" drum sets can be, too. If you can't afford them now, you might want to consider saving for the long-term.
Any of these instruments are great for learning instruments even in tight living situations - and if you learned them all, you could put together your own band! Just make sure to keep the volume low or the headphones on.