How To Care For Your Guitar | Keep It In Optimal Shape For Years To Come
“It is the time you have wasted for your rose that makes your rose so important.” ― Antoine de Saint-Exupéry

If you are in any shape or form serious about your guitar practice and music, you'll want to take good care of your instrument.
Guitars are quite rugged, yes, but that is no reason to mistreat them, especially once you start getting better quality ones.
It's like when you finally get the car you wanted. Would you bump it and scratch it all around? Yeah, me neither.
In that sense it is that in this lesson I'll teach you the basic things you need to know to make sure you always take care of your guitar, which will allow it to work for years to come and, like wine, get better the older it gets.
We'll be covering how to protect, store, handle, transport, and clean it.
Let's start with the basics that apply to the care of all guitars.
Protection

Guitars are very nice, aren't they? The whole reason why there are so many models out there is virtually only aesthetic.
So yeah, we like our instrument to be beautiful in addition to having nice sound.
Durability is another subject, however. While there are guitars that are more robust than others, you can't go wrong by knowing how to protect it from damage that will affect every and all guitars.
The most important source of damage at this stage is mechanical damage, like bumps, scratches, twists, as well as combinations of those.
When you are not playing the guitar, there are two main ways in which you can help protect the guitar from harm:
Gig bag
Whenever you buy a new guitar, you should throw in a gig bag for it as well. They are usually cheap unless you dive into the top-of-the-line bags, but even a simple cheapo goes a long way into protecting your six-string lady (yes, guitars are female, sorry my female readers).
The two main sizes for gig bags are acoustic and electric. Like the names suggest, these are designed for each kind of guitar, and usually it's enough to choose a bag. However, there are exceptions of bigger and smaller acoustic and electric guitars that might not fit all acoustic and electric bags, and this is why it's often a good idea to purchase a gig bag adequate for the guitar you are buying by choosing it on the spot and making sure it fits snuggly (it should not allow much movement of the instrument inside it), especially since you can get good quality bags for as low as $20-30.
These bags tend to be quite soft and flexible, with a varying amount of padding that can protect the guitar from virtually all scratches (unless you are a maniac and attack it with a knife).
As for bumps, depending on the amount of padding it has, they are usually good enough.
Twists are a different problem. The main problem with twists is the damage it can do to the neck. A soft bag has little to no protection unless it's a very thick and padded bag.
As for protection from the elements, mainly humidity, gig bags are no good. Unless you were to find a bag which is air-tight, which I've never seen one since they use zippers, you should avoid leaving it in humid places for too long (as in as little time as possible). Humidity affects the wood by swelling and contracting it, which can lead to cracks both in the wood itself as in the paint and finish. It also affects the strings, which will rust much faster (even wound nylon strings will have the wounding wire rusted), in addition to affecting the rest of the metallic hardware on the guitar (bridge, pots, etc).
Normally, you'll want to be wary of just how much humidity the guitar is subjected to. You don't want to keep it too humid, which will make the wood swell and possibly warp, but you don't want it to become too dry either, which will contract it and make it less flexible, and therefore more brittle. Not good in any case, but let's continue with the bags, and we'll dive more into humidity later in this lesson.
Gig bags come in many shapes and colors, although the most common color is black. They will have at least one handle for carrying it by hand, and at least one strap to carry it on the shoulders (sometimes the straps are removable).
These are a couple of photos from the bags I own:

Bags number 1, 2, and 4 are for electric guitars. Number 1 is especifically designed for a Jackson RR model, which I own, which has a very distinctive shape. Numbers 2 and 4 are for standard super strat model electric guitars.
Bags number 3 and 5 are for acoustic or electroacoustic guitars. I store my electroacoustic on bag 3 and my acoustic on bag 5.
Case
A case can be thought of as a hard bag for most intents and purposes.
They hold your guitar inside a protective hard material that will protect it from all mechanical damage.
The only consideration is the effect of humidity. Although cases are usually not air-tight, they tend to be much tighter than bags, which will help prevent excessive humidity to get inside it.
Tip: get yourself a bag of silica gel and store it inside the case for maximum protection from humidity.

They also come in models for acoustic and electric guitars, although the same considerations on size apply to cases as they do for bags. Unless you are buying the case at the same time with your new guitar, it's often a good idea to take the guitar to the store to help you choose a right one.
Cases tend to be more expensive than bags. You can have cases that retail for hundreds of dollars, although you can still get some that are more affordable (like this one).
Here are a couple of photos of the cases I own:

This case I use exclusively for my Jackson PS4. It's all about the color ensemble, hahaha!

This case is specially designed for my Ibanez SZ320, which is possibly my favorite axe in my arsenal.

This last one is the odd one out.I bought this case about two years ago for cheap, and I have it as a backup in case anything goes south with any of the other ones...or maybe it's just waiting for a new guitar to come by... Only time will tell.
Now, if we are talking about how to protect the guitar while you are playing it, the main advice is to have common sense and be prudent.
If you are playing by yourself in your room, make sure you have nothing close to it that can hit or scratch the guitar (this includes playful dogs and cats that want to get to know the guitar better).
If you are rehearsing with your band, the same concept applies, with the added consideration of the other musicians. Try not to bump into each other and hit your instruments.
If you are playing onstage, it's usually not a problem unless the stage is very small or exceptionally crowded.
Be wary of your surroundings and it should be fine.
I hate it when I hit my guitar against stuff. People are fine, and sometimes they deserve it, but objects are innocent.
Storage

Not very common, indeed, but it can happen that you have to store a guitar for an extended period.
Situations like going on a trip overseas on a scholarship, or getting hurt in an accident and be restricted to bed can leave you away from your guitar for quite some time. A couple of months or more.
Even if you are travelling and want to take the guitar with you, it might happen that you have more than one guitar, so it will be a good idea to take only one and store the rest.
If you are going to be on leave for more than two weeks, I recommend taking special care for the storage of the instrument.
To that end, the best option would be a guitar case. The reason a case is better is because it's more air-tight than bags. Together with some dessicant, like the silica gel I talked about above, it will help keep your guitar fresh for a long time.
However, in these situations the consideration of temperature becomes increasingly important. In everyday use it's usually a minor concern, but when leaving the instrument unattended for long, the effect of temperature can be considerable, especially in countries that have huge temperature swings throughout the year.
The effect of temperature on the wood is very similar to that of humidity. It can expand or contract the wood and produce cracks. The strings are not affected by temperature, luckily.
To minimize this, there are couple of things you can do:
Avoid storing in any place that is subject to direct sunlight. Stay clear off windows.
Air currents are to be avoided as much as possible. Avoid doors.
Basements are tempting. Usually the temperature of a basement is more stable than the rest of the house; it won't get too cold in winter nor too hot in summer, so it's a definite possibility for long-term storage.
If you are sure that humidity won't be out of control (especially make sure that the basement is not prone to flooding), then it's a very good place to store your guitar.
If humidity might be a problem, but you still want to use the basement, what you can do is try to seal the case as much as possible. You can try adding a weatherstrip to the case so that it makes a good seal, and yes, you can even consider duct-taping it all around.
Just make sure you get back and pick up the guitar soon, or else she'll feel lonely.
Handling

I've seen many players treat their guitars like sh*t onstage.
I've also seen many others treating them as their loved ones, which has even made me think twice if that is even legal.
You can agree or disagree with me, but the truth is that there is no car enthusiast in the whole World that doesn't care if their car is scratched because of reckless driving, or even just driving normally. No, there is no such thing.
My question to you, then, is this:
Are you a guitar enthusiast too?
Do you treat your guitar as such?
Yeah, I know, I said I had one question for you, but ended up asking two. So sue me.
Myself, I consider myself as such, which is why I treat my guitars with the utmost care. It's especially important to know how to handle it adequately when you are playing live, but also if you are practicing by yourself in your room. Remember that any damage resulting from mistreatment adds up.
This means that you should stay clear of any abrasive elements next to the guitar.
Whenever you pick up your instrument, you should avoid grabbing it by the neck. The only exception to this is if you pick it up vertically.

The reason why this is because the body of the guitar tends to be quite heavy, which in turn produces a considerable amount of torque on the neck. Although this is not a guarantee of damage, and even many Luthiers have assured me it's completely safe, it's best to avoid it altogether. Why risk it?