Body piercing in general has become very fashionable these days, and a significant amount of that piercing occurs on the outer ear. Typically, and classically, ears were pierced down here, and this lower part of your earlobe is fat. The upper part has cartilage in it.
If you get an infection in your earlobe where there's fat, you take the piercing out, you put hot compresses on it, and it will almost always resolve. This is a fairly resistant area to severe infection. When you pierce through cartilage, however, the possibility of severe infection goes up, and if it occurs, it requires much more aggressive therapy, often with oral or intravenous antibiotics.
So, the first thing is, when you have your ears pierced you want to be sure that whoever's doing the piercing cleans your ear thoroughly with an antiseptic, such as alcohol or iodine solution, before they do the piercing. You want to be sure that the earring that's put in through the piercing is a high quality metal which lowers the likelihood of infection.
If there is any redness, or crusting, or drainage around the piercing it means that there's an infection. And the first step is to just soak the area well, keep it clean, buy some over the counter antibiotic ointment such as Bacitracin, and put it around two or three times a day. That will generally resolve the problem.
However, if it doesn't, it may be necessary to take the piercing out and be more aggressive with your therapy. Unfortunately, when such an infection occurs and you have to take the piercing out, the likelihood is that the hole will scar over, and you'll have to start over at step one after the infection is resolved.