Before a doctor treats a patient, he determines what the diagnosis is. Before we rush in to stamp out any rebellious behavior in our teenagers, we have to figure out where it's coming from. First, realize that some "rebellion" is normal, as your teenager becomes more adult and aware of other lifestyles, which he may identify with more than with yours. If your teenager wants to get a really wacky hairstyle or wear black nail polish, you can ask why s/he wants to look like that and point out how other people might view it. You don't have to react instinctively; take time to read books that deal with parenting teenagers or consult with others.
If your teenager's rebellion is not just the normal emotional and hormonal ups and downs of adolescence, it's even more important to track down the reason for this extreme behavior. Underneath teenage anger at parents or society is often pain. Maybe your teen went through trauma or abuse a year or more prior to this unusual behavior and now the pain is coming out in rebellion. Bipolar disorder, problems at school (academically or socially), family disharmony, or a group of friends who experiment with drugs can all result in teenagers acting up; but each cause must be dealt with very differently.
Once you've discovered the cause for the rebellion and take care of the underlying problem, tips for dealing with your teen are to heal your relationship and ignore as much of the minor issues as you can. While respecting your teen's privacy, you do have to know where s/he is and set reasonable times for being at home. If you think your teenager has a better relationship with another relative, a pediatrician, or a guidance counselor at school, encourage the relationship and don't take it personally. Make an effort to treat your teenager with respect, have reasonable expectations and avoid power struggles.