You must have a law degree, and that typically takes 3 years of law school. Before law school, you must obtain a bachlors degree, that usually takes 4 years or more.
Lots of good things about being a criminal defense attorney, helping people is the best feeling of all. Seeing good people get punished is the least enjoyable aspect of criminal defense, but overall it's a great job!
To become a criminal lawyer in California, a person must first pass the bar. This happens after graduation from law school. Law school lasts for 3 years for a full-time student, and four-years for an evening program. At least one program in the country (Southwestern in Los Angeles) offers a two-year program.
Most law schools (but not all) require a bachelor's degree (typically a four-year program) as a condition of admission.
I was a prosecutor for 13 years before entering private practice in 2007. The best part of criminal law depends on whether you are a prosecutor or a defense attorney. To me, the best part of being a prosecutor was having the ability and power to do justice in every case. Sometimes this means aggressive prosecution to achieve the lengthiest prison sentence possible. Other times it means dismissing the case because you have a doubt about the person's guilt, or allowing a creative sentence like a residential drug treatment program for a deserving defendant. The hardest thing about being a prosecutor was being a government employee. The standard of living was certainly well above most people's, but your salary is capped at a certain point. You'll never go above that regardless of your merit. Also, your salary may be the same as another person's, even though that person is a lazy, unmotivated attorney counting the days until retirement. Also, the higher you go in government, the more political it becomes. It can be disheartening when you disagree with the district attorney's polices, priorities, and/or approach to running the office.
As a defense attorney, by far the most rewarding thing for me (and the most unexpected given my background) is the "counseling" aspect of the job, where I can use my knowledge and abilities to help some fundamentally good people during a crisis in their life. The most difficult (especially after being a DA) is lacking the power to easily achieve the result you think is appropriate.
Four years of post secondary/undergraduate studies, then 3 to 5 years of law school depending on the number of classes you take in law school and if you are a day or evening student. Most students finish law school in 3 or 4 years, but I believe the Bar Association requires that you complete law school within 5 years.